Skip to content

Instantly share code, notes, and snippets.


Nat Burgwyn burgwyn

View GitHub Profile
burgwyn / gist:5602186
Created May 17, 2013
This snippet iterates through the AppSettings entries and returns an unordered list of bolded keys and values. I like to add this to the 'About' page that comes bundled in the web project templates in Visual Studio.
View gist:5602186
StringBuilder sb = new StringBuilder();
if (ConfigurationManager.AppSettings.HasKeys())
sb = new StringBuilder( "<ul style=\"list-style-type:none;\">" );
foreach (string key in ConfigurationManager.AppSettings.Keys)
sb.AppendFormat( "<li><strong>{0}</strong> - {1}</li>", key, ConfigurationManager.AppSettings[key] );
You can’t perform that action at this time.