Thursday, March 12, 2009

ASPNET.MVC Validation UpdateModel() Gotcha

Not only did the Yellow Screen of Death point the error to the incorrect line, the error itself shouldn’t be there according to the tutorial.

While examining the stack trace closer, I could see the offender was HtmlHelper.GetModelStateValue(). How could that be?

A missing call to UpdateModel(), that’s how.

No comments: