tags:

views:

15

answers:

1

I need to customize the validation message style. The way I am approaching this is to wrap the ValidationSummary 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!

+2  A: 

This doesn't work? ViewData.ModelState.IsValid

Arnis L.
Its exactly what I needed! Thanks!
Lukasz
Lucky guess. ^_^
Arnis L.