2
2obvious
I want to declare some constants on the application level in
global.asax to use throughout my application, e.g.:
Sub Application_OnStart()
Const NUM As Integer = 5
End Sub
Problem is, when I do it this way, the scope of the constants is
local--attempting to use these constants in a typical .aspx file
throws an error telling me that 'NUM' is undeclared. Doing this:
Sub Application_OnStart()
Global Const NUM As Integer = 5
End Sub
or this:
Sub Application_OnStart()
Public Const NUM As Integer = 5
End Sub
doesn't work either; illegal syntax.
Can this be done? Keep in mind I'm talking about global _constants;_
I already know how to make Application variables. Those are
variables, they can be changed.
global.asax to use throughout my application, e.g.:
Sub Application_OnStart()
Const NUM As Integer = 5
End Sub
Problem is, when I do it this way, the scope of the constants is
local--attempting to use these constants in a typical .aspx file
throws an error telling me that 'NUM' is undeclared. Doing this:
Sub Application_OnStart()
Global Const NUM As Integer = 5
End Sub
or this:
Sub Application_OnStart()
Public Const NUM As Integer = 5
End Sub
doesn't work either; illegal syntax.
Can this be done? Keep in mind I'm talking about global _constants;_
I already know how to make Application variables. Those are
variables, they can be changed.