tags:

views:

24

answers:

1

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

A: 

This may help (taken from MSDN):

The display behavior depends on whether client-side validation is performed. If client-side validation is not active (because the browser does not support it or because it has been disabled by using the Page.ClientTarget page directive or EnableClientScript property), ValidatorDisplay.Static and ValidatorDisplay.Dynamic behave the same way: the error message takes up space only if it is displayed. The ability to dynamically allocate space for the message when it is not being displayed (ValidatorDisplay.Dynamic) only works with client-side validation.

NightOwl888