comparevalidator control interprets date in the wrong format

V

VancouverMike

Hi there,

I have a web app written in 1.1 in ASP.net and C#. In the web app, I need to
compare two dates (from and to) from two textboxes on webpage to make sure
the to date is greater than or equal to from date, by using comparevalidator
control. The app is working fine in production server, but recently when I
put the code into development environment (Windows 2000 server), the
comparison is not working properly. Even I set the date format in Regional
Setting in Control Panel to be "dd/MM/yyyy", and the value in the two
textboxes are correct, the validator control still complains and shows error
message. It seems that the code always interprets the date in MM/dd/yyyy
format. I am wondering if I need to set some culture information for the
whole site so the whole site will interpret the date in the consistent
format? In my web.config file this is the globalization section:

<globalization
requestEncoding="utf-8"
responseEncoding="utf-8"
/>

I would appreciate any help from you.

Regards,
Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top