title: Prevent full postback for UserControl with ValidationProperty attribute
body: <p>I have an ASP.NET usercontrol that implements the <code>ValidationProperty</code> attribute. This attribute successfully makes it possible for me to use a <code>RequiredFieldValidator</code> for my custom control, however on validation it causes a full postback rather than using client side javascript based validation. </p>
  
  <p><em><strong>Is there a way to prevent this and enable client side validation without using a custom validator?</em></strong></p>
  
  <p>This is the what my UserControl looks like.</p>
  
  <pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucBooleanRadio.ascx.cs" Inherits="MyCompany.Web.UserControls.ucBooleanRadio" %&gt;
  
  &lt;div class="BooleanRadio"&gt;
      &lt;input runat="server" id="radTrue" type="radio" name="BooleanRadio" value="True" /&gt; Yes
      &lt;input runat="server" id="radFalse" type="radio" name="BooleanRadio" value="False" /&gt; No
  &lt;/div&gt;
  
  [ValidationProperty("Checked")]
  public partial class ucBooleanRadio : System.Web.UI.UserControl
  {
      public Nullable&lt;bool&gt; Checked
      {
          get
          {
              if (radTrue.Checked || radFalse.Checked)
                  return radTrue.Checked;
              else
                  return null;
          }
          set
          {
              radTrue.Checked = value != null ? value.Value : false;
              radFalse.Checked = value != null ? !value.Value : false;                    
          }
      }
  }
  </code></pre>
  
  <p>And this is how it is being used</p>
  
  <pre><code>&lt;uc1:ucBooleanRadio ID="ucAgree" runat="server" /&gt;
  &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" CssClass="Validator" Display="Dynamic" ControlToValidate="ucAgree" InitialValue="" ErrorMessage="You must agree to continue."&gt;&lt;/asp:RequiredFieldValidator&gt;
  
  Page.Validate();
  if (Page.IsValid)
  {
      //Do stuff
  }
  </code></pre>