|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ASP.NET 2.0 static variables in Global.asaxIn Microsoft Knowledge base, Article ID: 312607 says:
"It is recommended that you store data in static members of the application class instead of in the Application object." Does this apply for ASP.NET 2.0? If it does, how can I accomplish this? I am using c#... Thanx in advance, Drasko hi drasko,
in .net 2, i would put the static variable anywhere in App_Code. e.g. public class Util { public static string Whatever = "Hello"; then anywhere in your site you can use Util.Whatever to access the string, it will be the same across all sessions and instances of the application. good luck tim Show quote "drasko" <draskosa***@gmail.com> wrote in message news:1157707490.052447.197860@e3g2000cwe.googlegroups.com... > In Microsoft Knowledge base, Article ID: 312607 says: > "It is recommended that you store data in static members of the > application class instead of in the Application object." > > Does this apply for ASP.NET 2.0? If it does, how can I accomplish this? > I am using c#... > > Thanx in advance, > > Drasko > |
|||||||||||||||||||||||