ASP.net: Retrieve connection string from web.config


/ Published in: ASP
Save to your folder(s)

Replace *SERVERNAME* with the name of the server name in the web.config


Copy this code and paste it in your HTML
  1. WebConfigurationManager.ConnectionStrings["SERVERNAME"].ConnectionString;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.