Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. Public string Name { get; set; }
  2. public IEnumerable<ValidationResult> Validate(ValidationContext validationContext) {
  3. // validation logic which is not being called on post.
  4. }
  5.  
  6. Public MyModel { get; set; }
  7.  
  8. [HttpPost]
  9. public ActionResult Index(MyModel model)
  10. {
  11. // this is always true??
  12. if(this.ModelState.IsValid) { blah blah }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement