Question

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 ??

enter image description here

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top