Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 18th, 2006, 05:43 AM
Authorized User
 
Join Date: Dec 2005
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kapi.goel
Default ComapreValidator is not working with Dates

I am using a 2 TextBoxes having Date in the format of dd/mm/yyyy

Now on using CompareValidator as follows

<asp:CompareValidator id="cmpDate" Runat="server" ErrorMessage="*" ControlToValidate="TextBox2" Display="Dynamic" Type="Date" Operator="GreaterThanEqual" ControlToCompare="TextBox1">
</asp:CompareValidator>

The problem is CompareValidator is not validating.

I can't change the format.

I guess same code is working with mm/dd/yyyy date format

Please gime an idea how to do this....

Kapil


KG
__________________
KG
 
Old April 20th, 2006, 01:50 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

I don't think you can compare the type and value at the same time. Use 2 compare validators, one to check the type for Date and one to compare the values






Similar Threads
Thread Thread Starter Forum Replies Last Post
window.opener working .... not working alyeng2000 Javascript How-To 5 January 5th, 2007 08:05 AM
Web.Config..Working or Not Working peace95 ASP.NET 1.0 and 1.1 Basics 1 September 18th, 2006 06:53 AM
Local COM working , but not working at Web Serv nagen111 .NET Web Services 3 February 19th, 2005 04:22 AM
Get Working Copy... not working Enkiel Classic ASP Basics 0 April 21st, 2004 01:41 PM
Working with Dates in SPROC [email protected] SQL Language 4 March 10th, 2004 03:56 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.