enumerate app settings

Tuesday, December 04, 2007 5:21 AM | Leave a reply »

well sometimes you just need to enumerate all of the keys in your appsettings section in web.config

this is how it's done

   1: foreach (string str in WebConfigurationManager.AppSettings.AllKeys)
   2: {
   3:     Response.Write(string.Format("Key : {0},Value {1}
"
,
   4:                  str, WebConfigurationManager.AppSettings[str]));
   5: }


Comments

  1. Gravatar Anonymous says:

    Re : # 

    You've been kicked (a good thing) - Trackback from DotNetKicks.com


Leave a Reply



 

Please add 1 and 6 and type the answer here: