Validator extender
-
Is there a way to test to see if the compare validator in JavaScript? My issue is I have a calendar extender and the clientside code calls its corresponding update. The problem lies that if the validator returns true that I don't want to the Update to occurs. Here's a snippet. function CalStartChanged() { var prm = Sys.WebForms.PageRequestManager.getInstance(); prm._doPostBack('UpdatePanel2',''); } <asp:UpdatePanel ID="UpdatePanel2" runat="Server"> <ContentTemplate> <asp:TextBox runat="server" id="txtStartDate" Width="100px" CssClass="LeftSelectionSmall"/> <img src="Images/Calendar.jpg" id="btnStartDate" alt="Choose start date." runat="Server"/> <ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtStartDate" Animated="False" PopupButtonID="btnStartDate" OnClientDateSelectionChanged="CalStartChanged"/> </ContentTemplate> </asp:UpdatePanel> Protected Sub UpdatePanel2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles UpdatePanel2.Load If scriptManager1.IsInAsyncPostBack And scriptManager1.AsyncPostBackSourceElementID = "UpdatePanel2" Then dgresults.DataSource = oData.FillDataTable(StrQueryReturn(txtStartDate.Text, txtEndDate.Text, lstShift.SelectedValue, lstSpecies.SelectedValue, lstPackType.SelectedValue)) dgresults.DataBind() 'Put the sql in the cheat box CB.Text = StrQueryReturn(txtStartDate.Text, txtEndDate.Text, lstShift.SelectedValue, lstSpecies.SelectedValue, lstPackType.SelectedValue) End If End Sub