Get section of appSettings as raw xml : ConfigurationSection « Configuration « ASP.NET Tutorial






<%@ page language="C#" %>

<script runat="server">

void Page_Load(object sender, System.EventArgs e)
{
    string appPath = this.Request.ApplicationPath;    
    Configuration config = Configuration.GetConfigurationForUrl(appPath);
    
    ConfigurationSection section = config.Sections["appSettings"];
    this.textBox1.Text = section.GetRawXml().OuterXml;
}
    
</script>

<html>
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form runat="server">
        <asp:textbox id="textBox1" runat="server" textmode="MultiLine" width="300px" height="100px">
        </asp:textbox>
    </form>
</body>
</html>








16.12.ConfigurationSection
16.12.1.Get section of appSettings as raw xml