Author: VBManner | Posted on: 12/31/2008 7:45:55 AM | Views : 289

I have an aspx page in VS2003 that has a from and to date for a report date range.

If I enter in an invalid date in the from textbox and click on the to date the code below shows the validator error message correctly for the from date.

However if I go back into the fromdate textbox and correct the date and then click on to date the error message for the from date does not clear leaving the error message up and confusing the user.

How do I get the error message to clear?

 Thanks in advanced.

<asp:TextBox id="txtFromDate" Width="100px" runat="server" MaxLength="10" />
<asp:CompareValidator id="cvFrom" runat="server" ErrorMessage="From Date Invalid"
ControlToValidate="txtFromDate" Operator="DataTypeCheck" Type="Date" />
...

Go to the complete details ...