I write this code in application_Start method of global.asax.
vb file :
Public cnConnection As SqlConnection
cnConnection = New SqlConnection("server=(local); database=test; User ID=sa; Password=sa")
cnConnection.Open()
Now I want to use this cnConnection in my Login page and
In Login page i write this code.
Dim strSQL As String = "Select * from user_detail"
Dim cnCommand1 As SqlCommand = New SqlCommand(strSQL, cnConnection)
It gives me a error message i.e.
C:\Inetpub\wwwroot\Login\frmLogin.aspx.
vb(86): Reference to a non-shared member requires an object reference.