Problem applying data annotation in asp.net mvc2
Posted
by Fraz Sundal
on Stack Overflow
See other posts from Stack Overflow
or by Fraz Sundal
Published on 2010-06-14T14:44:34Z
Indexed on
2010/06/14
14:52 UTC
Read the original article
Hit count: 391
asp.net-mvc-2
Im facing problem when trying to apply data annotation. In my case im passing FormCollection in controller
[HttpPost]
public ActionResult Create(string Button, FormCollection collection)
{
if (ModelState.IsValid)
{
}
else
{
}
}
and in ModelState.IsValid condition always have true value. Although i have left some blank fields in View. Also EnableClientValidation() is also applied in View for client side validation but its not working. what may be the problem
© Stack Overflow or respective owner