In my MVC3 application, I have a form with 2 dropdown lists that are not required, therefore, No comments have been added for. When I add a new object, no client verification code is added and all of them are OK. The problem increases when I try to modify an object that has value on properties associated with dropdownlists, because this code is automatically added
data-val = " True "data-val-number =" field IDCategory should be a number. "Data-Val-Required =" IDCategory field is required. " Id = "ddlcategory" name = "List.Category.IDCategory"
Therefore, if I try not to set a value on dropdownlists on this object and after submitting the form it Fake recognition is removed I think the solution 2:
- To add a generation of verification codes, add a few comments to the related attribute
- View the object in the object (like the canceled class on the button) , I tried to add them, but this does not work)
Thanks advance! You can always use JQuery to remove the client side verification class from a special control.
$ ('# myControl'). RemoveClass ('myClass');
Comments
Post a Comment