Hi
I want to know how the connectionstring is retrieved from this code
Application[Constants.appSettingsDataFolderPath] = ConfigurationManager.AppSettings[Constants.appSettingsDataFolderPath]
Thanks
Akila
I want to know how the connectionstring is retrieved from this code
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Jun 22, 2011, 3:41 AM EDT
Pradeep ChandrakerRank #941 · 2.2K reputationPosted Jun 22, 2011, 6:28 AM EDT
string connStr = ConfigurationManager.AppSettings[Constants.appSettingsDataFolderPath].ToString();
Or, you can try this if you have your database connection information in web.config connectionStrings section.
string connStr = ConfigurationManager.ConnectionStrings[Constants.appSettingsDataFolderPath].ConnectionString;