title: How to fire DropDownList AutoPostBack only if all validations in a page are met
body: <p>I've got in a page three filters. Two textboxes for dates (from and to) and a dropdownlist for a specific value.
  Well I have several validations for the dates filters and they all work as expected. the problem is that even if the validations are not met I can still change the selected item in the dropdownlist, which has its AutoPostBack property set to true.</p>
  
  <p>Here's the code I use to validate my page.As you can see , I'm already using a validation group.</p>
  
  <pre><code>        &lt;table align="center"&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      FROM
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;asp:TextBox ID="txtFromDate" runat="server" Width="80px" Style="text-align: center"&gt;&lt;/asp:TextBox&gt;
                      &lt;Toolkit:CalendarExtender ID="ceFechaInicial" runat="server" Format="dd/MM/yyyy"
                          PopupButtonID="ImgFechaInicial" TargetControlID="txtFromDate" /&gt;                          
                      &lt;Toolkit:MaskedEditExtender ID="meeFecha" runat="server" AcceptNegative="Left" DisplayMoney="Left"
                          ErrorTooltipEnabled="false" Mask="99/99/9999" MaskType="Date" MessageValidatorTip="false"
                          UserDateFormat="DayMonthYear" OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError"
                          TargetControlID="txtFromDate" ClearMaskOnLostFocus="true" /&gt;
                      &lt;Toolkit:MaskedEditValidator ID="mevFecha" runat="server" ControlExtender="meeFecha"
                          ControlToValidate="txtFromDate" Display="None" EmptyValueBlurredText="" EmptyValueMessage=""
                          ErrorMessage="Fecha no es válida" InvalidValueBlurredMessage="*" InvalidValueMessage="La fecha no es válida"
                          SetFocusOnError="true" TooltipMessage="" ValidationGroup="findGroup" IsValidEmpty="true" /&gt;
                      &lt;Toolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="Server" CssClass="customCalloutStyle"
                          HighlightCssClass="validatorCalloutHighlight" TargetControlID="mevFecha" WarningIconImageUrl="~/images/msjeAdvertencia.png" /&gt;
                      &lt;asp:CompareValidator ID="CompareValidator3" runat="server" ControlToCompare="txtFromDate"
                          ControlToValidate="txtToDate" Display="None" ErrorMessage="Fecha final no debe ser menor que la inicial"
                          Operator="GreaterThanEqual" SetFocusOnError="false" Type="Date" ValidationGroup="findGroup"&gt;&lt;/asp:CompareValidator&gt;
                      &lt;Toolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="Server" CssClass="customCalloutStyle"
                          HighlightCssClass="validatorCalloutHighlight" TargetControlID="CompareValidator3"
                          WarningIconImageUrl="~/images/msjeAdvertencia.png" /&gt;                           
                  &lt;/td&gt;
                  &lt;td&gt;
                      TO
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;asp:TextBox ID="txtToDate" runat="server" Width="80px" Style="text-align: center"&gt;&lt;/asp:TextBox&gt;
                      &lt;Toolkit:CalendarExtender ID="ceFechaFinal" runat="server" Format="dd/MM/yyyy" PopupButtonID="ImgFechaFinal"
                          TargetControlID="txtToDate" /&gt;                            
                      &lt;Toolkit:MaskedEditExtender ID="txtToDate_MaskedEditExtender" runat="server"
                          AcceptNegative="Left" DisplayMoney="Left" ErrorTooltipEnabled="false" Mask="99/99/9999"
                          MaskType="Date" MessageValidatorTip="false" UserDateFormat="DayMonthYear" OnFocusCssClass="MaskedEditFocus"
                          OnInvalidCssClass="MaskedEditError" TargetControlID="txtToDate" ClearMaskOnLostFocus="true" /&gt;
                      &lt;Toolkit:MaskedEditValidator ID="mevFecha0" runat="server" ControlExtender="meeFecha"
                          ControlToValidate="txtToDate" Display="None" EmptyValueBlurredText="" EmptyValueMessage=""
                          ErrorMessage="Fecha no es válida" InvalidValueBlurredMessage="" InvalidValueMessage="La fecha no es válida"
                          SetFocusOnError="true" TooltipMessage="" ValidationGroup="findGroup" IsValidEmpty="true" /&gt;
                      &lt;Toolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="Server" CssClass="customCalloutStyle"
                          HighlightCssClass="validatorCalloutHighlight" TargetControlID="mevFecha0" WarningIconImageUrl="~/images/msjeAdvertencia.png" /&gt;
                      &lt;asp:CompareValidator ID="CompareValidator4" runat="server" ControlToCompare="txtToDate"
                          ControlToValidate="txtFromDate" Display="None" ErrorMessage="Fecha final debe ser mayor que la inicial"
                          Operator="LessThanEqual" SetFocusOnError="false" Type="Date" ValidationGroup="findGroup"&gt;&lt;/asp:CompareValidator&gt;
                      &lt;Toolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="Server" CssClass="customCalloutStyle"
                          HighlightCssClass="validatorCalloutHighlight" TargetControlID="CompareValidator4"
                          WarningIconImageUrl="~/images/msjeAdvertencia.png" /&gt;
                      &lt;asp:CustomValidator ID="StartDateValidator" runat="server" ClientValidationFunction="InitValidators"
                          Display="Dynamic" ErrorMessage="" OnServerValidate="StartDateValidator_Validate"
                          ValidationGroup="findGroup"&gt;&lt;/asp:CustomValidator&gt;                            
                  &lt;/td&gt;
                  &lt;td&gt;
                      &amp;nbsp;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;asp:DropDownList ID="ddlModels" runat="server" AppendDataBoundItems="True"
                          AutoPostBack="True" OnSelectedIndexChanged="ddlModels_SelectedIndexChanged"&gt;
                          &lt;asp:ListItem Value="0"&gt;Select&lt;/asp:ListItem&gt;
                      &lt;/asp:DropDownList&gt;
                      &lt;asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="ddlModels"
                          Display="None" ErrorMessage="Select a model" Operator="NotEqual" ValidationGroup="findGroup"
                          ValueToCompare="0"&gt;&lt;/asp:CompareValidator&gt;
                      &lt;Toolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender9" runat="Server" CssClass="customCalloutStyle"
                          HighlightCssClass="validatorCalloutHighlight" TargetControlID="CompareValidator1"
                          WarningIconImageUrl="~/images/msjeAdvertencia.png" /&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &amp;nbsp;
                  &lt;/td&gt;                       
                  &lt;td&gt;
                      &lt;asp:Button ID="btnFind" runat="server" CssClass="button small blue" OnClick="btnFind_Click"
                          Text="Buscar" ValidationGroup="findGroup" Width="64px" /&gt;
                  &lt;/td&gt;                        
              &lt;/tr&gt;
          &lt;/table&gt;
  </code></pre>
  
  <p>Is there any way to only fire the postback caused by the dropdownlist AutoPostBack when all the validations in the page are met?</p>