hi,
i build a custom login button with two text boxes and i was using the same code that you provide me before, but now everything just stay the and did not log in nor go anywhere.
can you help me to take a look if i have done correctly?
thanks.
Dim userName As String = UserNametxt.Text
Dim password As String = Passwordtxt.Text
If (AuthenticateEmployee(userName, password)) Then
Dim connString As String = ConfigurationManager.ConnectionStrings("DBHUSRConnectionString").ConnectionString
Dim DBConnection As SqlConnection = New SqlConnection(connString)
Dim DBCommand As SqlCommand
Dim DBReader As SqlDataReader
Dim thisUserName As String
If DropDownList1.SelectedValue = "AD" Then
DBConnection.Open()
DBCommand = New SqlCommand("QGlobalUserRecords_sp", DBConnection)
DBCommand.CommandType = CommandType.StoredProcedure
DBCommand.Parameters.AddWithValue("@UserID", Login1.UserName())
DBReader = DBCommand.ExecuteReader()
While DBReader.Read()
If userName = DBReader("WM_UserName") Then
thisUserName = DBReader("WM_Comments")
Select Case thisUserName
Case "Agency"
Response.Redirect("~/Agency/Agency.aspx")
Case "Admins"
Response.Redirect("~/Admin/Default.aspx")
Case "STUHUSR"
Response.Redirect("~/Advising/StudentRecord.aspx")
Case "Faculty"
Response.Redirect("~/Faculty/Faculty.aspx")
End Select
End If
End While
End If
If DropDownList1.SelectedValue = "ACAD" Then
Response.Redirect("~/Student/StudentAssignment.aspx")
End If
DBConnection.Close()
End If