ASP.NET mvc 2 Validation always shows errors on initial page load.

Posted by gt124 on Stack Overflow See other posts from Stack Overflow or by gt124
Published on 2010-05-14T14:57:12Z Indexed on 2010/05/14 15:04 UTC
Read the original article Hit count: 239

Filed under:
|

I've searched around a lot, and honed this problem down to this case: I'm using the PRG pattern, pragmatically I'm using the same DTO for my post/get actions. It looks like when I have the dto with the data annotation attributes in the get action parameter list, the validation is always displaying errors, every time on initial page load.

In some cases this could be desired behavior if you put asterisks in the error message, but how do I get rid of it?

Thanks in advance.

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about asp.net-mvc-2