Brought from (our old site): http://salearningschool.com/displayArticle.php?table=Articles&articleID=1324&title=Manipulating%20Configuration%20Parameters:%20For%20example%20Variables%20in%20web.config To access a variable value, you can use the following type of code string statusr = WebConfigurationManager.AppSettings["userLoginStatus"].ToString(); You will need to use: using System.Web.Configuration; or you can write as follows: string statusr = System.Web.Configuration.WebConfigurationManager.AppSettings["userLoginStatus"].ToString(); What about if you want to change the values of the variables in the web.config […]

Read more of this post