Validate and save user

Ø

Øyvind Isaksen

Hello,

I am making a page for employees registration.
First, the employee need to submit a password. This is checked in a database
and returns the companyID where this user shold be saved.
Then, I need to show a usercontrol than displays the registration form. This
usercontrol need the companyID as an input.

I need to understand the way for doing this??
Is there possible to set "usercontrol.visible = true" code behind, with an
input (categoryID)? Or is it smart to redirect a new page with the
registrationform (then I need to transfer the companyID to this page, I dont
want to do this in the URL)?



Thsi is the code that find the companyID for this employee:

Private Sub btnVerify_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnVerify.Click
Dim SQL As String = "select customerID from tblCustomer where
password=@password and active = '1'"
Dim conn As New SqlConnection(variables.ConnString)
Dim cmd As New SqlCommand(SQL, conn)
Dim parameter1 As New SqlParameter("@password", Me.txtVerify.Text)
cmd.Parameters.Add(parameter1)

conn.Open()
Dim dr As SqlDataReader = cmd.ExecuteReader

while dr.read
'Show usercontrol with registration form....???? How do i do
this?
end while

conn.Close()

conn.Dispose()
cmd.Dispose()
End Sub



I'm stucked!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top