Skip to content

Instantly share code, notes, and snippets.

Created October 27, 2015 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/58f1c650c6dff1ed72e2 to your computer and use it in GitHub Desktop.
Save anonymous/58f1c650c6dff1ed72e2 to your computer and use it in GitHub Desktop.
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class ConfigReader : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
AppSettingsReader asr = new AppSettingsReader();
string[] keys = ConfigurationManager.AppSettings.AllKeys;
foreach (string key in keys)
{
lblKeys.Text = lblKeys.Text.ToString() + "<p>" + key + " - " + (string)asr.GetValue(key, key.GetType()) + "</p>";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment