469,609 Members | 1,574 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

comparevalidator control interprets date in the wrong format

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
Apr 11 '08 #1
0 2302

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Jorge EA | last post: by
1 post views Thread by R.A.M. | last post: by
reply views Thread by R.A.M. | last post: by
1 post views Thread by R.A.M. | last post: by
1 post views Thread by =?Utf-8?B?RGF2ZQ==?= | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.