I tried getting the value like this:
System.Configuration.ConfigurationSettings.AppSettings["Database1ConnectionString"];
but I get the error This method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings
even if i used the System.Configuration library, i can't see the ConfigurationManger still.
thanks in advance.
~Shareb

Blocked AccountRank #403 · 6.2K reputationPosted Nov 22, 2007, 12:25 AM EST
use this to get the connection string value from the web.config. and also sure that you have included the namespace System.Configuration
ConfigurationManager.AppSettings["ConnectionString"];
hope it will help you
Shareb16 reputationPosted Nov 22, 2007, 1:15 AM EST
well, i've already tried that but in vain, it works fine with Web.Config i guess.
but i get this error "The type or namespace ConfigurationManager does not exist in the namespace 'System.Configuration' (are you missing a reference?)"
Kumar Duvvarapu37 reputationPosted Dec 25, 2007, 12:01 AM EST
pls replace System.Configuration.ConfigurationSettings.AppSettings["Database1ConnectionString"]
with
System.Configuration.ConfigurationManager.AppSettings["Database1ConnectionString"]
Shareb16 reputationPosted Dec 25, 2007, 5:21 AM EST
Raj KumarRank #25 · 44.2K reputationPosted Jan 1, 2008, 2:22 AM EST
Should work in 50215 are you sure you did add areference to
System.Configuration.dll!.
try this
string sss =System.Configuration.ConfigurationManager.AppSettings["server"].ToString();
you might be get a warning massage.
vijay kumar24 reputationPosted Feb 5, 2008, 11:30 PM EST
add the configuration dll and use it in ur page...