How to read from web.config?
You have to import System.Configuration
Lets say you have this in your web.config file:
[appSettings]
[add key="keyName" value="keyValue" /]
[/appSettings]
Retrieve it like this
using System.Configuration;
ConfigurationSettings.AppSettings["keyName"];
Lets say you have this in your web.config file:
[appSettings]
[add key="keyName" value="keyValue" /]
[/appSettings]
Retrieve it like this
using System.Configuration;
ConfigurationSettings.AppSettings["keyName"];
Comments