|
Thank you very much. i got the clear picture...
one more time let me disturb you...
i have created a file called include.cs and placed in the App_code.
created a public enumeration like this..
<br />
public enum MyEnum<br />
{<br />
alfa = 1,<br />
beta = 2,<br />
gamma = 3<br />
};<br />
let me know how to access this enum and list the vales in a .aspx page
i will be thankful to you...
sebastian
Sebastian
|
|
|
|
|
reference it as you would any enumeration, just precede it with the class name as it shows in your new .cs file - somehting like:
enum include.MyEnum;
(Sorry, I'm not an expert in C#)
Fred
|
|
|
|
|
Sebastian T Xavier wrote: which contains some global variables and enumerations
Technically there is no such thing as a global variable in .NET - it is Object Oriented and you would do good to go research what OOP is before embarking on an ASP.NET application, especially if your coming from a classic ASP background (which it sounds like you are).
Assuming by global you mean you've declared a variable like: (I realise you're probably working in VB.NET but I don't do VB.NET, it sucks)
public class MyGlobals<br />
{<br />
public static readonly string MY_GLOBAL_VAR = "some value";<br />
}
To then use this you would simply have to import the namespace with a using statement (if the class is inside another namespace) and reference the variable like:
MyGlobals.MY_GLOBAL_VAR;
|
|
|
|
|
Hi,
Thanks for your reply... I will agree with the concept(static variable). But i am working on webapplication, and i think use of static variables may slow down / cause some performance flaw in the application. Thats why i tried to keep an enumeration in the file and include that in the code behind page..
awaiting for your suggestions
Thank you once again
Sebastian
|
|
|
|
|
i m using asp.net,exporting reports on PDF(using crystalreport), i want to print the primarykey field(number) in arabic number format. help me to solve this problem!!!
shakul hameed s
|
|
|
|
|
i have a webpage, in that i have 5 links like
concept 1
concept 2
concept 3
concept 4
concept 5
in the same page after the 5 links i have description for that 5 links
concept 1
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa top^
concept 2
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb top^
concept 3
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa top^
concept 4
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb top^
concept 5
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb top^
now if i press "top^" i need to take the page to top. how to do it.
and if i press the "concept -" link it should show the selecter link discription. how to do it.
please any one help me...
Pradeep Reddy
|
|
|
|
|
For the top link, add a link to the top of the page, usually around the header, like <a name="top">your header</a> (it doesn't have to have test, just be at the top of the page) and then your top link will look like: <a href="#top">top^</a>.
To show description you will need to set style initially with display:none and then add an onclick handler to the "concept -" links that will toggle the display property to :block. There are plenty of handy scripts to do this, google it.
|
|
|
|
|
hi
if i have some error page means this error page is automatically redirect to default page(for ex:i have error page in runtime it will redirect to page like (this is under construction)) .plz send me the details
|
|
|
|
|
You can add the following lines to your web.config file:
<customerrors mode="on" defaultredirect="yourerrorpage">
Gautham
|
|
|
|
|
wat lines i have to add in web.config.plz send the full details.thank u
|
|
|
|
|
customErrors mode="On" defaultRedirect="your_error_page"
Gautham
|
|
|
|
|
|
Hi whats the use of reflection?,
In which place we will use that one...,
Plz tell me some idea abt that...,
Advance thanks,
Regards,
Magi
|
|
|
|
|
In ASP.NET, probably not a whole lot. If you want to be able to dynamically consume a dll, then it's very useful, for example.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Reflection is the ability to read metadata at runtime. Using reflection, it is possible to uncover the methods, properties, and events of a type, and to invoke them dynamically. Reflection also allows us to create new types at runtime, but in the upcoming example we will be reading and invoking only.
Reflection generally begins with a call to a method present on every object in the .NET framework: GetType. The GetType method is a member of the System.Object class, and the method returns an instance of System.Type. System.Type is the primary gateway to metadata. System.Type is actually derived from another important class for reflection: the MemeberInfo class from the System.Reflection namespace. MemberInfo is a base class for many other classes who describe the properties and methods of an object, including FieldInfo, MethodInfo, ConstructorInfo, ParameterInfo, and EventInfo among others. As you might suspect from thier names, you can use these classes to inspect different aspects of an object at runtime.
Regards,
Satips.
|
|
|
|
|
Did you copy and paste this from a website ? It doesn't actually answer his question, which was, what is reflection used for ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi friends
i need password strength like gmail
i got the code in codeproject .
i have asp 1.1 version
it is not working
how can i modify this
regards
saravanan
|
|
|
|
|
If you found some code in an article, use the article forum to ask the article author for help. If you want more general help, tell us what it is you're talking about. No-one can answer this question, it makes no sense. What's 'not working' mean ? Where on Code Project ? Etc.
You can test password strength with a regex, just define whatever rules you like for it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have answered him CG and he said that i am working with asp.net 1.1 and i had helped him many times.
But he is not questioning what is his exact need and he is not doing anything?
Let him do and learn.
Everytime he will get the code and he will copy it in his application.
Regards,
Satips.
|
|
|
|
|
I'm sorry, I cannot work out what it is you're trying to say ? Don't answer him ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Yes CG let him try and implement the Concept.
I had helped him many times.
But what he need is the complete code from us.
Regards,
Satips.
|
|
|
|
|
Hi,
"It is not working"??????????????????????????????????? what do u mean by this?
Do u get any error?
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
I have answered him many times.He said that i am working with asp.net 1.1 and i had helped him many times.
But he is not questioning what is his exact need and he is not doing anything?
Let him do and learn.
Everytime he will get the code and he will copy it in his application.
Regards,
Satips.
|
|
|
|
|
here is simple example of Form
Name :[TextBox1]
Age :[textBox2]
Gender : male/female [Radio Buttons]
Country : List of all countries [list]
[Submit] <- button1
------------------------------------------
Now here is heart of question......
suppose guest entered....
Name :John
Age :21
Gender : male
Country : United Stated of America
[Submit] <-- button1
--------------------------------------------
As the above information if John has entered the details , then can that information send to specific e-mail ID with all details ???
PLEASE URGENT HELP NEEDED................
|
|
|
|
|
Dim objEmail as New MailMessage()
objEmail.To = txtTo.Text
objEmail.From = txtFrom.Text
objEmail.Cc = txtCc.Text
objEmail.Subject = "Test Email"
objEmail.Body = txtName.Text & ", " &txtComments.Text
objEmail.Priority = MailPriority.High
'SmtpMail.SmtpServer = "your smtpserver"
try
SmtpMail.Send(EMail)
Response.Write(Your E-mail has been sent sucessfully - _
Thank You)
catch exc as Exception
Response.Write("Send failure: " + exc.ToString())
End Try
Thanks
Warm Regards
Prakash-B
|
|
|
|