Hi I am trying to create a registration page.I am using linq to sql for creating the data models.And have created an aditional class for accesing the data I do not know if this is the corect way to do it but this is how managed to make it work.
Here is my code:
[Required]
[DataType(DataType.Password)]
[Display(Name="Password")]
public string password
{
get { return member.Password; }
set { member.Password = value; }
}
[Required]
[DataType(DataType.Password)]
[Display(Name = "Confirm Password")]
[Compare("Password" , ErrorMessage = "The password and confirm pasword do not match")]
public string confirmPassword { get;set; }
My database does not have a field for confirm password.I am using the database generated for the Membership API.
When I try to submit the data I get this error:
Could not find a property named Password.
How can I corect this?
The error is absolutely correct.
public string passwordis lowercase, and .Net is (mostly) case-sensitive.