I face an error during the creation of the web setup. The error is that when I change values in the second textbox then compare validator is popping up.
Please solve my problem.
here is my html code which is shown below
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</cc1:ToolkitScriptManager>
<asp:Label ID="Label1" runat="server" Text="From Date"></asp:Label>
<asp:TextBox ID="TxtBoxFromDate" runat="server"></asp:TextBox>
<cc1:CalendarExtender ID="TxtBoxFromDate_CalendarExtender" runat="server"
Enabled="True" TargetControlID="TxtBoxFromDate" Format="dd/MM/yyyy"
TodaysDateFormat="dd/MM/yyyy">
</cc1:CalendarExtender>
<br />
<br />
<asp:Label ID="Label2" runat="server" Text="To Date"></asp:Label>
<asp:TextBox ID="TxtBoxToDate" runat="server"></asp:TextBox>
<cc1:CalendarExtender ID="TxtBoxToDate_CalendarExtender" runat="server"
Enabled="True" TargetControlID="TxtBoxToDate" Format="dd/MM/yyyy"
TodaysDateFormat="dd/MM/yyyy">
</cc1:CalendarExtender>
<br />
<br />
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="TxtBoxToDate" ControlToValidate="TxtBoxFromDate"
ErrorMessage="CompareValidator" Operator="LessThanEqual" Type="Date"
ValueToCompare="dd/MM/yyyy">To Date must be greater than From Date</asp:CompareValidator>
</form>
</body>
</html>