Hi friends
I want to know how can we access a connection string from web config file in web application ?
Thank you.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted May 31, 2012, 10:32 AM
In web.config file
Call it in webpage as
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["dbconnection"].ToString());
Thanks
VulpesPosted May 31, 2012, 8:34 AM
http://msdn.microsoft.com/en-us/library/ms178411.aspx