Skip to content

Instantly share code, notes, and snippets.

Nat Burgwyn burgwyn

Block or report user

Report or block burgwyn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@burgwyn
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.