Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

global variable for aspx code behind program?

0 views
Skip to first unread message

mark

unread,
May 30, 2003, 8:24:42 PM5/30/03
to
My code in global.asax.vb need to pass some values to aspx code-behind
program. Can I define a public variable in Global?

I tried session("vars") and get "Session state is not available in this
context" error. And cookie behave bizarre (lag one fresh).

Alvin Bruney

unread,
Jun 5, 2003, 11:37:30 AM6/5/03
to
the global asax file gets compiled into a dll at run time which is available
to any peice of code within that application, you don't need to use session,
session may not be available anyway.
Simply treat the global object as if it were an ordinary object and create a
new object then access what ever variables you want to or better yet, make
these variables static so you won't have to instantiate in your code behind.

"mark" <cng...@hotmail.com> wrote in message
news:#KArJswJ...@TK2MSFTNGP12.phx.gbl...

0 new messages