How to Determine ASP.NET MVC 1.0 Validation State inside the View
I need to customize the validation message style. The way I am approaching this is to wrap the ValidationSumma开发者_StackOverflow社区ry helper with a styled div. The problem I have is that the div is visible even when there is no error on the page. Is there a way to determine if the ModelState has an error inside the view? Or should I approach this problem some other way.
Thank You!
This doesn't work?
ViewData.ModelState.IsValid
精彩评论