Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
<%@ Page Language="C#" %>
<%@ Import namespace="System.Web.Configuration" %>
<script runat="server">
void Page_Load ()
{
lbl.Text = WebConfigurationManager.AppSettings["testSetting"];
}
</script>
<asp:Label id="lbl" runat="server" />

View File

@@ -0,0 +1,44 @@
<%@ Page Language="C#" %>
<%@ Import namespace="System.Web.Configuration" %>
<script runat="server">
void Page_Load ()
{
string value = "";
System.Configuration.Configuration c = WebConfigurationManager.OpenWebConfiguration("/toshok/configuration/twolevel");
lbl.Text = String.Format ("{0} (c.FilePath = {1}", c.AppSettings.Settings["testSetting"].Value, c.FilePath);
lbl2.Text = WebConfigurationManager.AppSettings["testSetting"];
object s = WebConfigurationManager.GetSection ("appSettings");
if (s is NameValueCollection) {
NameValueCollection col = (NameValueCollection)s;
value = String.Format ("{0} (section type = NameValueCollection)", col["testSetting"]);
}
else if (s is AppSettingsSection) {
AppSettingsSection sect = (AppSettingsSection)s;
value = String.Format ("{0} (section type = AppSettingsSection)", sect.Settings["testSetting"].Value);
}
lbl3.Text = value;
s = WebConfigurationManager.GetSection ("appSettings", "/toshok/configuration/twolevel");
if (s is NameValueCollection) {
NameValueCollection col = (NameValueCollection)s;
value = String.Format ("{0} (section type = NameValueCollection)", col["testSetting"]);
}
else if (s is AppSettingsSection) {
AppSettingsSection sect = (AppSettingsSection)s;
value = String.Format ("{0} (section type = AppSettingsSection)", sect.Settings["testSetting"].Value);
}
lbl4.Text = value;
}
</script>
<table>
<tr><td>WebConfigurationManager.OpenWebConfiguration <td><asp:Label id="lbl" runat="server" /></tr>
<tr><td>WebConfigurationManager.AppSettings <td><asp:Label id="lbl2" runat="server" /> </tr>
<tr><td>WebConfigurationManager.GetSection(string) <td><asp:Label id="lbl3" runat="server" /> </tr>
<tr><td>WebConfigurationManager.GetSection(string,string) <td><asp:Label id="lbl4" runat="server" /> </tr>
</table>

View File

@@ -0,0 +1,6 @@
<configuration>
<appSettings>
<clear />
<add key="testSetting" value="hey!" />
</appSettings>
</configuration>

View File

@@ -0,0 +1,5 @@
<configuration>
<appSettings>
<add key="testSetting" value="hi" />
</appSettings>
</configuration>