Possible Duplicate:
In C# , how can I read a connection string stored in my web.config file connection string?
I am using the SqlConnection class to connect to a sql server database. One of the constructors for this class required a connection string argument…What is the easiest way to get the required information from the web.config file….
Use ConfigurationManager.ConnectionStrings collection to read connection string from web.config.