Load configuration with ConfigurationSettings.GetConfig : ConfigurationSettings « Development « ASP.NET Tutorial






<%@ Page Language="VB" %>
<%@ Import Namespace="System.Xml" %>

<script runat="server">
   sub Page_Load(Sender as Object, e as EventArgs)
      'retrieve information
      dim i as integer
      
      dim objLibrary as XmlTextReader = ConfigurationSettings.GetConfig("system.web/Library")
      
      objLibrary.Close
   end sub
</script>

<html><body>
   <asp:Label id="lblLibrary" runat="server"/>
</body></html>

File: web.config

<configuration>
   <system.web>
      <Library file="c:\yourXML.xml" />
   </system.web>
</configuration>








9.7.ConfigurationSettings
9.7.1.Load configuration with ConfigurationSettings.GetConfig