[thelist] (asp.net) application variables
Tab Alleman
talleman at Lumpsum.com
Wed Mar 22 13:54:18 CST 2006
Hmmm, the error goes away, but the value is empty.
How and where are you populating "sqlConnectionString"?
> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org]On Behalf Of Robert Vreeland
> Sent: Wednesday, March 22, 2006 2:40 PM
> To: thelist at lists.evolt.org
> Subject: Re: [thelist] (asp.net) application variables
>
>
> Not sure about VBScript, but in c# I'm currently using the
> following in the
> aspx page
> (string )ConfigurationSettings.AppSettings["sqlConnectionString"]
>
> Hope it helps,
> Robert
>
> -----Original Message-----
> From: thelist-bounces at lists.evolt.org
> [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Tab Alleman
> Sent: March 22, 2006 02:22 PM
> To: Evolt Thelist (E-mail)
> Subject: [thelist] (asp.net) application variables
>
> 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?
> --
>
> * * Please support the community that supports you. * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip
> Harvester and archives
> of thelist go to: http://lists.evolt.org Workers of the Web, evolt !
>
> --
>
> * * Please support the community that supports you. * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
More information about the thelist
mailing list