с# как прочитать web.config раздел appsettings / C# Read web.config section in appsettings

Всё очень просто оказывается
string s =System.Configuration.ConfigurationManager.AppSettings["smtpserver"];

А в файле web.config:
<appSettings>
  <add key="smtpserver" value="smtp.mail.ru"/>
</appSettings>

No comments:

Post a Comment

Note: only a member of this blog may post a comment.