Pages

Showing posts with label Getting web.config value in C#. Show all posts
Showing posts with label Getting web.config value in C#. Show all posts

Wednesday, 12 March 2014

Getting value intialized in web.config file in C#

Initialize value into web.config

//web.config initializing
<appsetting>
 <add key="from" value="abc@xyz.com"/>
</appsetting>

// C# code
string from = System.Configuration.ConfigurationSettings.AppSettings["from"];