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
vijay kumarPosted Feb 6, 2008, 4:30 AM
add the configuration dll and use it in ur page...
Raj KumarPosted Jan 1, 2008, 7:22 AM
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.
SharebPosted Dec 25, 2007, 10:21 AM
Kumar DuvvarapuPosted Dec 25, 2007, 5:01 AM
pls replace System.Configuration.ConfigurationSettings.AppSettings["Database1ConnectionString"]
with
System.Configuration.ConfigurationManager.AppSettings["Database1ConnectionString"]
SharebPosted Nov 22, 2007, 6:15 AM
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?)"
Blocked AccountPosted Nov 22, 2007, 5:25 AM
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