How to declare a Static variable in Global.asax?
Posted on 2006-11-19
I'm using Visual Studio 2005 and VB.NET. I'm in the Global.asax file. I want to make a global variable that will be used by all pages and sessions. I declared a practice variable "thisGlobals" to see how to declare a Static variable, but I get the error "'Static' is not valid on a member variable declaration". I can't see where I'm missing it. Can you show me how to declare a Static variable? Thank you.
<%@ Application Language="VB" %>
Public Static thisGlobals As String
...the other Global.asax code goes here.