I have a few controls on a page that are all in the same validation group. Depending on certain conditions, one of these controls can be set to visible=false (and the user wont be able to input anything into it). If this happens, is there a way to remove said control from the validation group? Code like this:
if(testControl.Visible==false) testControl.ValidationGroup="";
does nothing. Yet, if I remove the validationgroup from the aspx page like so:
<asp:RequiredFieldValidator ID="testControl" runat="server" validationgroup=""></asp:RequiredFieldValidator>
The page will validate. Is there a way around this?