Make sure you add a reference at the top of the page to
Imports System.Web.Configuration
Dim value As String = "mskilton@gmail.com"
Dim config As Configuration =
webConfigurationManager.OpenWebConfiguration("~")
Dim appsetting As AppSettingsSection =
config.GetSection("appSettings")
appsetting.Settings("emailaddress").Value = value
config.Save()
Have fun updating your web.config programmatically!
1 comment:
Just what I was looking for thank you!
Post a Comment