How To: Use ModelState

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Why on the first parameter you keep it as empty and then you set the model instance ?

ab_obada
Автор

Thank you Sir but I wish you could wait a few days till you get better then capture this video ;-)

m.hassanhojjati
Автор

Chris, if the modelstate is not valid, why do we have the postback to server. I mean had we used plain client side scripting, we could have avoided a hit to the server.

expertreviews
Автор

I almost thought I was going to get answer to my problem BUT u ignored the NullPointerReference error. Anyway, today at work I when I used ModelState.Isvalid, I had the same error. I googled for suggestion but it seems no one quiet understood how to solve it. I had a form like urs but when I click create, I would get an error. I.e the ModelState.Isvalid == false. Any ideas?

benardTechBytes