Hi,
there, i am trying to come up with this behind code using vb. i am getting error saying 'the username and password is not declared. i am not sure how to declare. please assisst me in this. this is a button which should work in a login page.
Protected Sub LoginButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
If Membership.ValidateUser(UserName.Text, Password.Text) Then
' Log the user into the site
FormsAuthentication.RedirectFromLoginPage(UserName.Text, RememberMe.Checked)
End If
' If we reach here, the user's credentials were invalid
InvalidCredentialsMessage.Visible = True
End Sub