how can we access a global variable defined in xxx.asax file in asp.net

Recommended Answers

All 3 Replies

>how can we access a global variable defined in xxx.asax file in asp.net

Application
object.

u can us..
session("variable name").

hello,

we can get and store value of session in particular data type,
and we can also directly use it.
here i write one example which shows accessing value of session variable and store it in string variable.

string strtemp = Convert.ToString(Session["sestemp"]);

strtmp is a string and sestemp is one of the session variable.
like this we can access any variable.

- mitul modi

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.