Asp: RangeValidator on DateTime with dd / MMM / yyyy format
3 answers
ASP.net automatically detects client information about the client. This information is used to enable formatting such as date, currency, etc.
You can override this with code (something like):
Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture("en-GB");
Thread.CurrentThread.CurrentUICulture =
new CultureInfo("en-GB");
Or globally in the web.config file:
<globalization requestEncoding="utf-8" responseEncoding="utf-8"
culture="en-GB" uiCulture="en-GB" />
Of course, this can have negative / positive side effects for the rest of your application, as it will affect other numbers / dates, but maybe this is your intention.
0
source to share