User Controls Importing Problem (asp.net)(vb)
- by Phil
I have this class that contains vars for db connection;
Public Shared s As String
Public Shared con As String = WebConfigurationManager.ConnectionStrings("foo").ToString()
Public Shared c As New SqlConnection(con)
Public Shared x As New SqlCommand(s, c)
I import this to my page like this;
Imports DBVars
I'm then able to access these vars from my page.
But if I try to import them into a user control the variables are not available. Am I making an error or is this expected?
Thanks.