ASP.Net/Session Cookie/HttpContext
Версия от 15:30, 26 мая 2010; (обсуждение)
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>
<%--
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="foo" value="bar"/>
<add key="foo2" value="bar2"/>
</appSettings>
</configuration>
--%>