Click here to Skip to main content
16,021,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to verify weather the form contains validations or not in MVC 4.0 Razor application.
because in my form 50 controls there, in that 30 controls are mandatory. i filled 29 controls with data, when i click on save button it shows pop up like "Please Enter data". how can i ?
Posted

1 solution

Please check your class as there you might have given the [Required] attribute and you validate with
if(ModelState.IsValid){
//Do the job
}
else{
//response=error message/validation message
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900