title: Validate RadioButtonGroup Client Side
body: <pre><code>&lt;asp:RadioButton GroupName="EndorsementType" runat="server" ID="rdoAddProperty" Text="Add Property to TIV" /&gt;
  &lt;asp:RadioButton GroupName="EndorsementType" runat="server" ID="rdoRemoveProperty" Text="Remove Property from TIV" /&gt;
  &lt;asp:RadioButton GroupName="EndorsementType" runat="server" ID="rdoChangeProperty" Text="Change Property Values" /&gt;
  </code></pre>
  
  <p>I was thinking about implementing a custom <code>validator</code>, and using a client <code>JavaScript</code> function to reference the RadioButton ID, (I'm using web forms, not mvc),</p>
  
  <pre><code>something like.. 
   if(document.getElementById(&lt;%= rdoAddProperty.ClientId %&gt;).checked == true) &amp;&amp; ...
  </code></pre>
  
  <p>Anyone know of a way to do it without knowing the clientId?</p>