I have a key in the web.config file like:
<add key="MailFrom" value="[email protected]"/>
I need to access it in the code behind.How to do this in c#?
You could use the AppSettings property indexer:
string from = ConfigurationManager.AppSettings["MailFrom"];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With