Configuration ASP.Net Tutorial

<%@ page language="C#" %>
 <%@ import namespace="System.Web.Management" %>

    
void Page_Load(object sender, System.EventArgs e)
{
    string appPath = this.Request.ApplicationPath;    
    Configuration config = Configuration.GetConfigurationForUrl(appPath);
    ConnectionStringsSection connStrings = (ConnectionStringsSection) config.Sections["connectionStrings"];
    foreach(ConnectionStringSettings connString in connStrings.ConnectionStrings) {
        this.Response.Write(string.Format("{0} = {1}", connString.Name, connString.ConnectionString));
    }
}
    



    Untitled Page