I would like to access connection string from app.config file but am not able to perform it. I am using C# as a programing language and visual studio 2010 IDE on windows 7 64 bit plateform.
Here you go..
You can use following line of code to access connection string from app.config file.
string cs = System.Configuration.ConfigurationSettings.AppSettings["cs"].ToString();
For this app.config file.
<?xml version="1.0" encoding="utf-8" ?>
<add value="DataSource=a;User Id=ccc;" key="cs"/>