I make a login module. In registration page email is sent to user to activate the account.
on login page what should i used code to not login the user who not acctivate the account .
My code is
Try
con.Open()
Dim cmd As New SqlCommand("select status from signup where name =" & "'" & txtname.Text & "'" & "and
password=" & "'" & txtpassword.Text & "'", con)
Dim value As [Object] = cmd.ExecuteScalar()
If value Is Nothing Then
Label1.Text = "Invalid Login. Please Try Again!"
Else
(What can i do here.I use the following coding but it always show invalid login.please try again)
Dim sqlDa As New SqlDataAdapter(cmd)
Dim dt As New DataTable()
sqlDa.Fill(dt)
lblstatus.Text = dt.Rows(0)("status").ToString()
If lblstatus.Text = "Pending" Then
Label1.Text = "Account not acctivated"
Else
Response.Redirect("eshop.aspx")
End If
End If
Catch ex As Exception
Label1.Text = "Error --> " & "Invalid Password. Please Try Again!"
Finally
con.Close()
End Try
Please help.