Web.config AppSettings

Global variables can be set in web.config. In general, these are variables that are not frequently changed. For example, the mail server. A key can be added in the section.

<configuration>
<appSettings>
    <add key="MyMailServer" value="mymailserver.com" />
</appSettings>
</configuration>

Then the value can be retrieved in the code

Dim MyMailServer as String = ConfigurationManager.AppSettings("MyMailServer")
Updated: March 6, 2015 — 4:57 pm

Comments

Add a Comment
  1. Your comment is awaiting moderation.

    Really tons of fantastic material.
    http://talahicc.com/
    canadian drugs
    aarp approved canadian online pharmacies
    canadian pharmacies shipping to usa
    canadian pharmacies online

Leave a Reply

Your email address will not be published. Required fields are marked *