Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

I'm having a problem recently with textbox showing times and a validator validating them.
What's happening is that the .NET 2 version of the System.Web.Extensions library has the ShortTimePattern for Italian set as "H.mm" but the TimeSeparator set as ":" (I got the values looking at the page HTML and seeing the __cultureinfo var being declared).
In Windows 7 this happens to be wrong (they changed the time to use ":" instead of "." in Italy), so the time appears in the box as, for example, 04.12 but of course the validator flags this as invalid, probably because it's expecting 04:12.

Is there a way out of this? It is fixed in .NET4 but upgrading can't be done now. I tried changing the TimeSeparator and the ShortTimePattern in the CurrentCulture but apparently this is not possible. If I try to force a particulare pattern of course the textbox will be blank (because of the masked editor extender).

Many thanks to whoever can help!
Posted
Comments
Nirmesh007 9-Nov-11 1:15am    
i have a textbox and i want to insert comma in fix position like 1,12,123,1234, like come in the pattern

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900