on your break point on line 125 do a Quick Watch on ModelState and go through the Values to find which one(s) have the error flag set.
Link from raphael will help.
سؤال
i have a form of the Grille Table: when adding a new object in my form :my modelState.isValid is set to false. i tried to identify the error by adding this method:
if (!ModelState.IsValid)
{
var errors = ModelState.SelectMany(x => x.Value.Errors.Select(z => z.Exception));
// Breakpoint, Log or examine the list with Exceptions.
}
and the error message was just "*" i didn't know how to fix it and exactly in which folder i must search my error ??
المحلول
on your break point on line 125 do a Quick Watch on ModelState and go through the Values to find which one(s) have the error flag set.
Link from raphael will help.