Click here to Skip to main content
15,306,245 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In web.config I have default connection when i wanna change the connection ,I will change through the UI,so i'm passing my database server name and userid password.

How can this effect un web.config file.
Posted

1 solution

I would highly recommend you do not change the web.config via code. However, if you feel you must see
http://stackoverflow.com/questions/7692675/how-to-change-to-connection-string-in-web-config-dynamically[^]
and
http://stackoverflow.com/questions/2260317/change-a-web-config-programmatically-with-c-sharp-net[^]

I would suggest you actually store the connection string somewhere else if you are planning on changing it via code.
   

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900