ASP.NET Tutorial/Development/HttpContext

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

HttpContext.GetAppConfig

<%@ Page Language="vb" %>
<html>
   <head>
      <script runat="server">
  Sub Page_Load()
     Dim i As Integer
           Dim nv As NameValueCollection
           nv = HttpContext.GetAppConfig("appSettings")
           For i = 0 To nv.Count - 1
              Response.Write(nv.GetKey(i) & " = " & nv(i) & "<br/>")
           Next
  End Sub
      </script>
   </head>
<body>
   <asp:label id="Message" runat="server"/>
</body>
</html>