Friday, 15 March 2013

How to display two different error message in ASP.NET MVC4 -


I want to display two different error messages first for the necessary and second for Int64 value. Here's my code. [Display (name = "employee")] [required] Public Int 64 employees {Received; Set; }

You can use the data annotation extension here: < P> then add the following two comments:

  [Required (error message = "Employee ID is required"]] [Data annotation extension.Interger (error message) "Enter valid number." )] {Receives public Int64 employees; Set; }    

No comments:

Post a Comment