.net framework get configuration value from web.config
ConfigurationManager.AppSettings["MySetting"]
.net framework get configuration value from web.config
ConfigurationManager.AppSettings["MySetting"]
add settings to config file c#
//Must install package System.Configuration.ConfigurationManager
//APPLICATION CONFIG FILE
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="Key0" value="0" />
<add key="Key1" value="1" />
<add key="Key2" value="2" />
</appSettings>
</configuration>
//CODE
using System.Configuration;
using System.Collections.Specialized;
//READ Value of Setting Key0
string sAttr = ConfigurationManager.AppSettings.Get("Key0");
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us