[thelist] (asp.net) application variables
Peter Brunone (EasyListBox.com)
peter at easylistbox.com
Wed Mar 22 14:53:13 CST 2006
Bear with me, but are you sure that's the line it's marking?
Also, is there perchance another object in page scope called "application"? That would seem to be more likely to throw an ambiguous name error, but this IS left over from Classic...
Peter
From: "Tab Alleman" talleman at Lumpsum.com
I'm having trouble storing and accessing a simple application variable in asp.net.
In my global.ascx file, I've got this:
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application is started
Application("foo") = "some text"
End Sub
and then in one of my pages, I've got this:
strFoo = Application("foo")
which produces the error: "Reference to a non-shared member requires an object reference".
What am I doing wrong? Should I be "NEW"-ing the Application somewhere? where?
More information about the thelist
mailing list