|
-
Aug 11th, 2007, 12:40 AM
#1
Thread Starter
New Member
Date Compare in ASp.NET
Hello Everyone
<tr>
<td style="height: 5px; width: 157px;">
Start Date</td>
<td style="height: 5px">
:</td>
<td style="width: 100px;" rowspan="2">
<asp:TextBox ID="txtsdate" runat="server" CssClass="fortextbox" Width="95px" Enabled="False" MaxLength="10"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtsize"
ErrorMessage="*" CssClass="forfont"></asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtsdate"
ErrorMessage="*" ValidationExpression="((([0][1-9])|([1-2][0-9])|([3][0-1]))-(([0][1-9])|([1][0-2]))-[1-2][0-9][0-9][0-9])" CssClass="forfont"></asp:RegularExpressionValidator>(DD-MM-YYYY)</td>
<td style="width: 72px; height: 5px;">
End Date</td>
<td style="height: 5px">:</td>
<td style="width: 75px; height: 5px;">
<asp:TextBox ID="txtedate" runat="server" CssClass="fortextbox" Width="95px" Enabled="False" MaxLength="11"></asp:TextBox><asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtsize"
ErrorMessage="Required"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtedate"
ErrorMessage="Regular" ValidationExpression="((([0][1-9])|([1-2][0-9])|([3][0-1]))-(([0][1-9])|([1][0-2]))-[1-2][0-9][0-9][0-9])"></asp:RegularExpressionValidator>
<asp:CompareValidator ID="Compedate" runat="server" ControlToCompare="txtsdate" ControlToValidate="txtedate"
ErrorMessage="Compare" Operator="GreaterThanEqual" Type="Date"></asp:CompareValidator></td>
</tr>
this is the code which i m using to compare two dates
Before publishing it was working nice
BUT AFTER PUBLISHING the validation is not working properly.
what is the reason behind that??
CAN ANYONE HAVE SOLUTION? PLEASE HELP ME
-
Aug 13th, 2007, 10:08 AM
#2
Re: Date Compare in ASp.NET
What happens after publishing? Does it simply get bypassed? Explain the specifics as to how you arrived to the conclusion that it was not working.
-
Aug 14th, 2007, 09:41 AM
#3
Thread Starter
New Member
Re: Date Compare in ASp.NET
After Publishing it is not comparing dates validation. If i input right daates then also it prompts for wrong input.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|