Context.GetConfig : Context « Session Cookie « ASP.Net






Context.GetConfig

<%@ Page Language="vb" %>
<html>
   <head>
      <script runat="server">
  Sub Page_Load()
     Dim i As Integer
           Dim nv As NameValueCollection
           nv = Context.GetConfig("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>



<%--
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <appSettings>
      <add key="foo" value="bar"/>
      <add key="foo2" value="bar2"/>
   </appSettings>
</configuration>

--%>
           
       








Related examples in the same category

1.Context.Items
2. Context.Items.Contains
3.Context.Timestamp
4.Context.SkipAuthorization
5.Context.IsDebuggingEnabled
6.Context.IsCustomErrorEnabled
7.Context.AddError
8.Context.Error
9.Context.Trace.IsEnabled
10.Context.User.Identity.IsAuthenticated