Exclude Control from Page.Isvalid
<p>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:</p>

<pre><code>if(testControl.Visible==false) testControl.ValidationGroup="";
</code></pre>

<p>does nothing.  Yet, if I remove the validationgroup from the aspx page like so:</p>

<pre><code>&lt;asp:RequiredFieldValidator ID="testControl" runat="server" validationgroup=""&gt;&lt;/asp:RequiredFieldValidator&gt; 
</code></pre>

<p>The page will validate.  Is there a way around this?</p>
