Hi, I have application in asp.net mvc 2. one of form in create user. but this form is not accepting date format of dd/MM/yyyy and MM/dd/yyyy i want to allow MM/dd/yyyy for save in db what have to do. i am am using c# language .
A:
You need to change the globalization tag on your web.config.
Lets suppose you want dateformat to be 'dd/MM/yyyy', which is used in Brazilian-Portuguese. To do this, you add this to your web.config:
<globalization
enableClientBasedCulture="true"
culture="pt-BR"
uiCulture="pt-BR"/>
You just need to find the culture that best suit on your application.
Guilherme Oenning
2010-10-28 10:11:22
ok, but other forms in the same application able to do the same . only one form is not taking why should this ?
Lalit
2010-10-28 10:14:01
Well, it's hard to help without looking at the code. One option is to check if there is some code changing the culture by using the Thread class. Try debugging and look at the Thread.CurrentThread.CurrentCulture to see if it matches the Culture defined on your web.config.
Guilherme Oenning
2010-10-28 10:30:03