[thelist] (asp.net) application variables

thelist at cjmarsh.com thelist at cjmarsh.com
Wed Mar 22 15:41:41 CST 2006


Tab

> Hmmm, the error goes away, but the value is empty.
> 
> How and where are you populating "sqlConnectionString"?

This would be in the web.config file. Within the tag <configuration> there will 
be a tag <appSettings>. You can add your own tag thus within this tag:

<add key="foo" value="some text" />

[..]

> > strFoo = Application("foo")
> > 
> > which produces the error:  "Reference to a non-shared member 
> > requires an object reference".

I'm not sure about this, but do you need to call the ToString() method thus:

strFoo = Application("foo").ToString()

HTH

Regards

Chris Marsh





More information about the thelist mailing list