Ø
Ø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!!!
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!!!