Looping through web.config to get values
- From: "Andy Sutorius via DotNetMonster.com" <u9025@uwe>
- Date: Tue, 24 Jan 2006 17:59:56 GMT
I have 2 values in the web.config with a key of ServersInCluster. However
when I execute this code I only get the 2nd value. I never get the 1st and
2nd value. Anyone know why?
private void Button2_Click(object sender, System.EventArgs e)
{
System.Collections.Specialized.NameValueCollection colNameVal;
colNameVal = System.Configuration.ConfigurationSettings.AppSettings;
foreach(string strKeysValue in colNameVal.GetValues("ServersInCluster"))
{
Response.Write(strKeysValue);
}
}
--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net/200601/1
.
- Prev by Date: Re: Looking for cookies?
- Next by Date: Re: QUERY: debugging ASP VBScript
- Previous by thread: Looking for cookies?
- Next by thread: RE: Looping through web.config to get values
- Index(es):