D
David Lozzi
Hey,
Trying to build a simple class to pull data from the web.config file. Here's
what I have
in common.vb
Imports System.Configuration
Public Class CommonFuncts
Public Property ConnectionString() As String
Get
Return ConfigurationSettings.AppSettings("ConnectionString")
End Get
Set(ByVal Value As String)
End Set
End Property
End Class
In my page header.ascx.vb
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim conn As String = ConnectionString
lblTest.Text = conn
End Sub
I am getting a blue underling on ConnectionString in header.ascx.vb. The
message is "Reference to a non-shared member requires an object reference."
How do I fix this?
Thanks a million!
David Lozzi
Trying to build a simple class to pull data from the web.config file. Here's
what I have
in common.vb
Imports System.Configuration
Public Class CommonFuncts
Public Property ConnectionString() As String
Get
Return ConfigurationSettings.AppSettings("ConnectionString")
End Get
Set(ByVal Value As String)
End Set
End Property
End Class
In my page header.ascx.vb
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim conn As String = ConnectionString
lblTest.Text = conn
End Sub
I am getting a blue underling on ConnectionString in header.ascx.vb. The
message is "Reference to a non-shared member requires an object reference."
How do I fix this?
Thanks a million!
David Lozzi