.net - C# connection string in web.config file -


In the code behind my page, how can I use a connection string that is stored in my web.config file ?

  system. Web. Configuration. Web Configuration Manager. Connection String ["YouConnStringName"]. ConnectionString;  

The system for this. References of configuration dll and System.Web.dll are required.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -