Created
October 27, 2015 18:09
-
-
Save anonymous/58f1c650c6dff1ed72e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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