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


You need to login to view comments.