comparevalidator control interprets date in the wrong format

comparevalidator control interprets date in the wrong format

am 11.04.2008 02:26:01 von 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:

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

I would appreciate any help from you.

Regards,
Mike