G
Guest
Hi there
Lets say that I put up a form which asks to create a user id and password. I place a button on the form and in the onclick I call two separate subroutines, The first checks to see if the userid already exists, the second will create the user Id. I'm going to need to connect to the database for both operations, my question is, can I create a connection object good for both operations. I guess the real question is the scope of the connection object I create. Can I define the connection object on the form level as I would in VB6 so that the connection object is available in both subroutines? Does asp.net have anything like a VB6 module where all forms can access the same code. Thanks in advance.
Lets say that I put up a form which asks to create a user id and password. I place a button on the form and in the onclick I call two separate subroutines, The first checks to see if the userid already exists, the second will create the user Id. I'm going to need to connect to the database for both operations, my question is, can I create a connection object good for both operations. I guess the real question is the scope of the connection object I create. Can I define the connection object on the form level as I would in VB6 so that the connection object is available in both subroutines? Does asp.net have anything like a VB6 module where all forms can access the same code. Thanks in advance.