views:

342

answers:

2

Hi! I'm using webservice for my Desktop application(C#). I want to edit my database connectionstring programmatically in web.config(in web service) through C#. How to do this? Any simple idea?

A: 

Take a look at WebConfigurationManager.

Myles
+2  A: 
ConfigurationManager.ConnectionStrings["connName"].ConnectionString = "new connectionstring";
Ismail