VB.NET Read Settings from web.config File


/ Published in: VB.NET
Save to your folder(s)



Copy this code and paste it in your HTML
  1. Public Class Settings
  2.  
  3. Private objSettings As AppSettingsSection
  4.  
  5. Public Sub New()
  6. objSettings = CType(WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.ApplicationPath).GetSection("appSettings"), AppSettingsSection)
  7. End Sub
  8.  
  9. End Class

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.