martedì 19 febbraio 2013

Getting Value From Web.Config

Sometimes you need to put, for example, configuration keys in the web.config file.
The following code shows how getting this value of the keys in the web.config.

Web.Config:

<appSettings>
    <add key="key" value="value" />
</appSettings>


C#:

ConfigurationManager.AppSettings["key"]


My Two Cents ...

Nessun commento:

Posta un commento