A
Andy Sutorius via DotNetMonster.com
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);
}
}
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);
}
}