Suppose we have <asp:RequiredFieldValidator ... /> and we want to the default value of Display to be Dynamic. I couldn’t think of any better way to set it than
span[style="visibility:hidden;"],span[style="visibility: hidden;"] {
display:none;
}
and I didn’t find anything (simple) in Google. What do you recommend?
Create a theme with a skin for
asp:RequiredFieldValidatorand set itsDisplayproperty toDynamic. Then each page you set to have that theme will default its validators toDisplay = "Dynamic".Note that if you set the
SkinIDon the validator in the skin template, then you will also have to set theSkinIDon allasp:RequiredFieldValidors you use throughout your page(s). If you really want every validator to default to dynamic, don’t set aSkinID.