Thursday, May 7, 2015

simplest use of Web.config

Put your value you want to retrieve in:

<appSettings>
   ....
   .....
   <add key="colorOfDog" value="black">
<appSettings>



then in code:

var whateveh = ConfigurationManager.AppSettings["colorOfDog"];

(using System.Configration;)

No comments: