ASP.NET MVC validation in weakly typed views

Posted by Eedoh on Stack Overflow See other posts from Stack Overflow or by Eedoh
Published on 2010-06-08T10:09:45Z Indexed on 2010/06/08 10:12 UTC
Read the original article Hit count: 248

Hello.

I have a problem validating data on view that is not strongly typed. I'm updating data from 3 different models on that view, and I have validation methods that work on them, but I don't know how to display the validation message.

Where should I put validation messages (on strongly typed views I put them in ModelState, I presume that does not make sense in this case), and how should I display them (I doubt that I will be able to use "validationmessagefor", maybe "validationmessage" somehow)?

© Stack Overflow or respective owner

Related posts about c#

Related posts about asp.net-mvc