Problem applying data annotation in asp.net mvc2 -


There is a problem in trying to implement data annotation In my case the controller is crossing FormCollection < / P>

  [http post] Create public functions (string buttons, formulas collection) {if (ModelState.IsValid) {} ​​else {}}  

and Always in the ModelState.IsValid status is the correct value. Although I left some blank fields in the scene, EnableClientValidation () is also not implemented for View of Client Side Verification but also. What can be the problem

Your view must be typed strongly, and in the parameters of your Create Function There should be no object holding your model, not a generic formclation, so if you have a model of my name that you have annotated, then you should be in the form of that parameter. Otherwise, how would a model binary know which class should check its form against?


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -