Use multiple web.config
In ASP.Net application, if you want to separate the database connection string from Web.config file, then you can place it in another Web.DB.Config file and can refer it from Web.config file as shown below,
This Web.DB.Config willl have the actual connection string as shown below,
<add key=”DBConn” value=” <your db connection string here>”/>
The DB Connection string can be accessed as shown below,
No comments yet.