The CompareValidator handles this correctly. Set its Operator property to
"DataTypeCheck" and Type="Date". The page's current thread provides the
CultureInfo object that dictates the date format. Usually users set the <@
Page Culture= > attribute. In your case, Culture="en-GB".
FYI: If you are looking for a more powerful date text box that handles
formatting, localization, validation and has a popup calendar, look at my
product "Peter's Date Package" at
http://www.peterblum.com/datecontrols/home.aspx.
--- Peter Blum
www.PeterBlum.com
Email:
PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
"Jon" <jo*******@NOCRAPTHANKStiscali.co.uk> wrote in message
news:e9*************@tk2msftngp13.phx.gbl...
Hi Gary,
how would you deal with different date formats though, eg
today is 15/02/04 where I am (UK) but 02/15/04 in USA. I'd say it's much
safer to present dropdowns for day/month/year and then build the date
server side. You could also add some javascript so a user can't enter something
like 30 February
Jon
"Gary Smith" <GS******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... In my ASP.Net application I am using textbox for user to enter the date.
How to enforce the user to enter only the numeric values( and "/"
character) in this edit box ?
Thanks for your suggestions.
Gary