0

First of all thank you for the example on how to create the login page. I am also new at this and I have been trying out the login page using a SQL db. I am getting an error on my code for the button click event.

If Page.IsValid Then
If dbconnection(FirstName.Text, txtLastName.Text) Then
FormsAuthentication.RedirectFromLoginPage(txtFirstName.Text, False)
Else
lblMessage.Text = "Invalid Name!"
End If


End If

This is the error:
Value of type string cannot be converted to "Systems.EventArgs"

Can someone please help :o

Thanks

belvee

2
Contributors
1
Reply
2
Views
12 Years
Discussion Span
Last Post by Kendel
0

Looks like a typo to me. The name of the textbox is txtFirstName not just FirstName.

First of all thank you for the example on how to create the login page. I am also new at this and I have been trying out the login page using a SQL db. I am getting an error on my code for the button click event.

If Page.IsValid Then
If dbconnection(FirstName.Text, txtLastName.Text) Then
FormsAuthentication.RedirectFromLoginPage(txtFirstName.Text, False)
Else
lblMessage.Text = "Invalid Name!"
End If


End If

This is the error:
Value of type string cannot be converted to "Systems.EventArgs"

Can someone please help :o

Thanks

belvee

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.