Types of validation in MVC...
How many types of Data Annotation Attributes in MVC ? Anonymous User 1829 08 Oct 2018 Types of validation in MVC...
Data 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; }