Types of validation in MVC...
How many types of Data Annotation Attributes in MVC ?
1590
08-Oct-2018
Updated on 08-Oct-2018
Anonymous User
08-Oct-2018Data Annotations in Asp.Net MVC
OR
public int StudentID { get; set; }
[Required(ErrorMessage = "Please enter password")]
public string Password { get; set; }
[Required(ErrorMessage = "Please enter ConfirmPassword")]
[DataType(DataType.Password)]
[Compare("Password", ErrorMessage = "Password not matching")]
public string ConfirmPassword { get; set; }