Regular Expression Validator - display block rather than inline when dynamic

Viewed 17809

Is there any way to make a RegularExpressionValidator render itself using display:block, instead of display:inline in its style attribute, when setting the Display property to "Display='Dynamic'"?

I have tried setting it in the stylesheet but this gets overwritten when it is rendered on the page.

Thanks

7 Answers

Works with .Display = ValidatorDisplay.Static for me, didn't set EnableClientScript to true.

Update 1 and affecting cssClass with a class having display: block; to each regValidator

Update 2 forget about what I wrote before, I guess you don't care now about this but for others I would say, I think it's a forget of MS about regExpVal to not respond to display: block cause customValidator seems to work..

So for the regExpValidator I found that putting clear:left; and float:left works, and if the element under them moves while errors appears, you put clear: left on it.

Related