|
Subject:
|
Global Variables in C#
|
|
Posted By:
|
su
|
Post Date:
|
12/11/2006 4:32:24 PM
|
Hi All,
I want to declare few global variable in my website's first page which I can use throughout the website. For ex. User_Login.
Among these global variables some of the values I will be getting it from database.
Does anybody have idea how to do this?
I am using C#.NET, Visual Web Developer & SQL Server 2000.
Please Help!
|
|
Reply By:
|
woodyz
|
Reply Date:
|
12/11/2006 5:13:13 PM
|
Global variables can be made available a number of ways.
One way is to place it in the cache, another is to place it in an Application variable, another is to provide a static member of a class.
That is just a few for starters. There are other ways as well.
Woody Z http://www.learntoprogramnow.com
|
|
Reply By:
|
su
|
Reply Date:
|
12/11/2006 5:18:40 PM
|
Okay..I figured out that I need to use session["var"] for my application.
|