954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Error message when running ASP login page

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

Belvee
Newbie Poster
2 posts since Jan 2005
Reputation Points: 10
Solved Threads: 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

Kendel
Newbie Poster
12 posts since Feb 2005
Reputation Points: 10
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You