Heres another way of accessing AppSettings
Add a Class to the project like this one
Imports System.Configuration
Public Class MyWebConfig
Public Shared ReadOnly Property ConnectionInfo() As String
Get
Return ConfigurationSettings.AppSettings("ConnectionInfo")
End Get
End Property
End Class
In your project you could access the appsettings using
"MyWebConfig.ConnectionInfo"
No comments:
Post a Comment