Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 September 12th, 2005, 11:59 AM
Registered User
 
Join Date: Aug 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default RegularExpressionValidator for Date

Dear All,

Could anyone tell me how to use RegularExpressionValidator to validate the date?
I'd like to valide "mm/dd/yyyy" format. eg. "9/13/2005". Please help me.

Thanks,
TW
 
Old September 13th, 2005, 12:48 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

   Is the date in a text box? You can use a compare validator. Set the ControlToValidate and ControlToCompare property to the textbox. Then set type property to Date.

 
Old September 26th, 2005, 01:15 PM
Registered User
 
Join Date: Aug 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes,
the date is in a text box. I only want to validate the format of the date. User may enter "25/12/2005". But the thing I want is "12/25/2005". So, please help me.

Thanks,
TW

 
Old September 26th, 2005, 01:22 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

I am not sure how do check the date format, unless you use a regular expression validtor, I think. I would use a calendar control and let the user select from there. Display the selected value in a textbox or lable. If you use a textbox, set the enabled property to false so they cannot edit it.

 
Old September 28th, 2005, 09:28 AM
Registered User
 
Join Date: Apr 2005
Posts: 352
Thanks: 14
Thanked 0 Times in 0 Posts
Send a message via Yahoo to rupen
Default

i suggest to use calendar control, instead of allowing user to enter date manually.

Rupen Anjaria.:)
------------------
We CAN'T avoid problems, but can solve it.





Similar Threads
Thread Thread Starter Forum Replies Last Post
RegularExpressionvalidator belete ASP.NET 1.0 and 1.1 Professional 2 October 20th, 2007 01:44 PM
RegularExpressionValidator collie Visual Studio 2005 0 October 11th, 2007 07:59 AM
RegularExpressionValidator somnath.kartic ASP.NET 1.0 and 1.1 Basics 4 April 3rd, 2006 09:01 PM





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