Asp: RangeValidator on DateTime with dd / MMM / yyyy format
Is it possible to use the ASP.Net range validator when the format string is dd / MMM / yyyy?
+1
SharePoint Newbie
source
to share
3 answers
Why aren't you using the regex validator?
+2
Alex reitbort
source
to share
Not. I think it should be a valid date (no formatting)
0
Leon tayson
source
to share
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
HectorMac
source
to share