run and exit application

  • Thread starter Thread starter kong
  • Start date Start date
K

kong

i'm very new to asp.net...
i'm facing problem since i want to run the application...

i put my connection string (strConnect) in a module (moduleConnect)
then when my first form load, i want to straight away connect to db.
so i write"moduleConnect.strConnect) in page_load like this:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
moduleConnect.strConnect()
End Sub

when i use datareader,
sqlCommand = New SqlCommand(queryString, moduleConnect.strConnect)
the "moduleConnect.strConnect" always wrong...... WHY? what should i
put?

by the way, i have 1 button to exit application.. in vb.net, i write
application.exit.... wat is the command in asp.net?


thx
regards,
kong
 
Hmm, I'm not sure if I follow you all the way.

So, you have a module with the strConnect variable declared as a String or
is it a method creating the connection string? Can you show us the code?
 
Back
Top