Problem in Connection string
-
All, I created a classlibrary for webapplication. In that i define a class for connection. I added my connection string in web.config file. But in Class i can't access the connection string I uses the code strConnect = System.Configuration.ConfigurationManager.ConnectionStrings("myconnection").ToString I get an error cofigurationmanager not a member of configuration Please help me This is Urgent
-
All, I created a classlibrary for webapplication. In that i define a class for connection. I added my connection string in web.config file. But in Class i can't access the connection string I uses the code strConnect = System.Configuration.ConfigurationManager.ConnectionStrings("myconnection").ToString I get an error cofigurationmanager not a member of configuration Please help me This is Urgent
-
Hi, You use like this: System.Configuration.ConfigurationSettings.AppSettings["constr"].ToString(); Hope this will solve the problem. Best Regards, Apurva Kaushal