In this post i will show how to fetch the values from configuration file using C#.net.If we want to use the parameter value for entire application in csharp we have a key value option in app.config file.I have shown a simple example for giving the server name to application using key value.
App.config :
Code Behind:
App.config :
<add key="Email" value="servername"/>
Code Behind:
string servername=ConfigurationManager.AppSettings["servername"].ToString();
No comments:
Post a Comment