Hi all
I have a web application,in which user has the option to enter dates from calendar to text boxes.
I have to check whether the user entered dates are in valid range,Its working perfectly in some machines ,but not working in some other
code
=============================================================================================================================
Start Date <asp:TextBox ID="txtStarttDate" Width="50px" Enabled="false" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtStarttDate" ToolTip="StartDate Required" runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
<asp:ImageButton ID="imgstardate" ImageUrl="~/Images/calenderIcon.jpg" runat="server" />
End Date <asp:TextBox ID="txtEndDate" Enabled="false" Width="50px" runat="server" ></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtEndDate" ToolTip="EndDate Required" runat="server" ErrorMessage="*"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="*" ControlToCompare="txtStarttDate" ControlToValidate="txtEndDate" Operator="GreaterThan" Type="Date" ToolTip="Invalid Range"></asp:CompareValidator>
<asp:ImageButton ID="imgEnddate" ImageUrl="~/Images/calenderIcon.jpg" runat="server" />
<cc1:CalendarExtender ID="CalendarExtender1" BehaviorID="startDate" PopupButtonID="imgstardate" PopupPosition="TopLeft" TargetControlID="txtStarttDate" runat="server">
</cc1:CalendarExtender>
<cc1:CalendarExtender ID="CalendarExtender2" BehaviorID="endDate" PopupButtonID="imgEnddate" PopupPosition="TopLeft" TargetControlID="txtEndDate" runat="server">
</cc1:CalendarExtender>
======================================================================================================================================
I have removed the compare validator and tried to test the code.Its working for me except date comparison
But when i hosted and tested the same application in same machine ,one link button which i need to process to
get the desired result (in which the dates are using entered by user)not working am getting the following error in IE...
Error: Sys.WebForms.PageRequestManagerServerErrorException:
String was not recognized as a valid DateTime
I need some immediate help please..
Thanks,
Jennifer