Just a suggestion, but if you use System.Configuration you'll won't have to
fully qualify it (ConfigurationSettings is really long so it's well worth it
;-)
"Andrew Banks" <ba****@nojunkblueyonder.co.uk> wrote in message
news:Bd*********************@news-text.cableinet.net...
Ended up with this working
System.Configuration.ConfigurationSettings.AppSett ings.Get("ConnectionString ")
Thanks for your input
"Michael Ramey" <raterus@localhost> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Perhaps try this,
System.Configuration.ConfigurationSettings.AppSett ings("ConnectionString")
"Andrew Banks" <ba****@nojunkblueyonder.co.uk> wrote in message
news:a%*********************@news-text.cableinet.net... Actually Michael, I've just tried this and it's saying the
Configuration namespace could not be found
Any ideas?
"Michael Ramey" <raterus@localhost> wrote in message
news:Oz**************@TK2MSFTNGP11.phx.gbl...
> <configuration>
> <appSettings>
> <add key="ConnectionString" value="SERVER=sql;DATABASE=myDB;Integrated > Security=SSPI" />
> </appSettings>
> ...
> </configuration>
>
> ConfigurationSettings.AppSettings("ConnectionStrin g")
>
> "Andrew Banks" <ba****@nojunkblueyonder.co.uk> wrote in message
> news:RJ*********************@news-text.cableinet.net...
> > I've heard talk of being able to move all sql connection strings
to the > > web.config file and simply referencing them as opposed to
inputting the > > string everytime you need to use it.
> >
> > Can someone give me an example of this please?
> >
> >
> >
>
>