Quantcast
Channel: Reading settings from app.config or web.config in .NET - Stack Overflow
Viewing all articles
Browse latest Browse all 29

Answer by Ruslan for Reading settings from app.config or web.config in .NET

$
0
0

Try this:

string keyvalue = System.Configuration.ConfigurationManager.AppSettings["keyname"];

In the web.config file this should be the next structure:

<configuration><appSettings><add key="keyname" value="keyvalue" /></appSettings></configuration>

Viewing all articles
Browse latest Browse all 29

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>