title: Setting Page.IsValid to False
body: <p>I've got an ASP user control which is basically using jquery UI datepicker just we'd have a standard calendar throughout our site.</p>
  
  <p>I am trying to create a validation for this control so I would not have to create the validation in every page using the calendar. Is it possible to set the Page_IsValid to false from the ascx?</p>
  
  <p>Here's the code:</p>
  
  <pre><code>&lt;%@ Control Language="VB" AutoEventWireup="false" CodeFile="jQueryCalendar.ascx.vb" Inherits="Controls_Misc_jQueryCalendar" %&gt;
  
      &lt;style type="text/css"&gt;
          div.ui-datepicker, div.ui-widget {
              font-size: 12px !important;
          }
          img.ui-datepicker-trigger{
              margin-bottom:-5px;
          }
      &lt;/style&gt;
      &lt;script type="text/javascript"&gt;
          $(document).ready(function () {
              $('.datepicker').datepicker({
                  showOn: 'button',
                  buttonImage: '&lt;%= Me.ImageURL%&gt;',
                  buttonImageOnly: true,
                  changeMonth: true,
                  changeYear: true,
                  showOtherMonths: true,
                  selectOtherMonths: true,
                  dateFormat: 'dd/mm/yy'
              });
          });            
          &lt;/script&gt;
  </code></pre>
  
  <p></p>