Click here to Skip to main content
15,905,614 members
Articles / Programming Languages / C#

Programatically update connectionstring using C#

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
15 Nov 2011CPOL 10.8K  
var configuration = System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration("~");var section = (System.Configuration.ConnectionStringsSection)configuration.GetSection("connectionStrings");section.ConnectionStrings["MySqlConnection"].ConnectionString = "Data Source=" + ...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead
India India
Project Lead
MCTS - .NET Framework 4.0, Web Applications

Blog : http://thakkermukund.wordpress.com
Twitter@thakkermukund

Don't code today, what you can't debug tomorrow!
Everything makes sense in someone's mind

Comments and Discussions