web.config data in cshtml code example Example: get web config key value in c# razor view @System.Configuration.ConfigurationManager.AppSettings["myKey"]