Posted on: 3/17/2014 7:02:09 PM | Views : 252

I have the following code to validate a date entry but it does not work right.  When the page comes up; a message "Invalid Date!" is alredy displayed and it displays the same message when I click on the textbox control for the date instead of displaying a calendar.
<td colspan="2"> <asp:TextBox ID="txtStartDate" Width="150px" runat="server" ontextchanged="txtStartDate_TextChanged"></asp:TextBox> <asp:CalendarExtender ID="CalendarExtender2" TargetControlID="txtStartDate" runat="server" Format="MM/1/yyyy"/> <asp:RequiredFieldValidator runat="server" id="reqStartDate" controltovalidate="txtStartDate" errormessage="Invalid Date!" ForeColor="Red" /> </td>

Go to the complete details ...