asp:Validator in invisible elements + invisible targets
- by Richard Neil Ilagan
Somewhat straightforward: will asp:Validators still perform validation when they're in invisible containers? How about if their ControlToValidate target is invisible?
For example:
<asp:Panel id="myPanel" runat="server" visible="false">
<asp:Textbox id="myTextbox" runat="server" />
<asp:RequiredFieldValidator id="myRfv" runat="server"
controltovalidate="myTextbox" />
</asp:Panel>
Above is a Validator in an invisible Panel. Would myRfv still perform validation? How about if myTextbox is invisible instead?
I'm asking this because I have very specialized Validators in my ASPX, wherein I also have Panels which are hidden/shown dynamically. While I'm all for disabling the validators themselves, I'm just curious whether they'll automatically disable anyway.
Thanks guys! :D