Benny Sutton is 4 hire - just click here

Get Values from the Web.Config file

Read user added keys from the web.config file into your C# code

             
        /// Wrapper to get values stored inside the web.config file
        static class WebConfig
        {
            public static int CompanyID()
            {
                return int.Parse(System.Configuration.ConfigurationManager.AppSettings["CompanyID"].ToString());
            }
            public static string SiteEmailAddress()
            {
                return System.Configuration.ConfigurationManager.AppSettings["SiteEmailAddress"].ToString();
            }
        }