To list key,value pairs of appsetting tag in webconfig and add it to hash table.

Posted by Teena under ASP.NET category on | Points: 40 | Views : 4464
Hashtable hList = new Hashtable();
for (int item= 0; item< ConfigurationManager.AppSettings.Count; item++)

hList.Add(ConfigurationManager.AppSettings.AllKeys[item].ToString(), ConfigurationManager.AppSettings[item]);


Comments or Responses

Posted by: T.saravanan on: 4/26/2011 Level:Silver | Status: [Member] [MVP] | Points: 10
Hi Teena,

Nice one.But don't use a variable 'i' in looping because in our website brace of 'i' is consider as italic format.So kindly change the variable 'i'.
Posted by: Teena on: 4/27/2011 Level:Starter | Status: [Member] | Points: 10
Hi Saravanan

I changed variable 'i' in looping to 'item'.Thanks for your comment.


Login to post response