Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 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 November 1st, 2005, 02:36 PM
Authorized User
 
Join Date: Oct 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to richie86
Default C#(ASP.NET) Validate date entry

How we config the Regular Expression Validator to be able validate a date format dd/mm/yyyy ? what is the expression we should added in?

I used this expression ^\d{1,2}\/\d{1,2}\/\d{4}$ but this expression is not good enough because it will accept the format in 99/99/9999, how to improve it to validate each the entry of day, month and year.

Thanks.

Goh Hoang Yuh
- C# Beginner in ASP.NET
 
Old November 3rd, 2005, 01:58 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Use the comparevalidator:
Set the ControlToValidate property to the conrol to validate
Set the Operator property to DataTypeCheck
Set the Type property to Date






Similar Threads
Thread Thread Starter Forum Replies Last Post
date entry Tim Johnson Access 1 December 26th, 2007 08:18 AM
How to validate date jijish ASP.NET 2.0 Professional 4 December 20th, 2007 07:17 AM
Send MS Outlook Calendar Entry From ASP.NET wackoyacky ASP.NET 2.0 Basics 0 June 17th, 2007 10:02 AM
Unable to validate data in ASP.net manojpatel ASP.NET 1.0 and 1.1 Professional 2 June 13th, 2006 02:31 PM
Validate Date sparc ASP.NET 1.0 and 1.1 Basics 1 September 20th, 2005 09:55 AM





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