i have set culture in Action Filer as
Thread.CurrentThread.CurrentCulture = Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
where culture = {fr-be} =>French Belgium.
FYI, this action filter sets the culture on user choice.
in one of myAction user is entering Date in format [dd/mm/yyyy] => 26/7/2011. Action is as follows
public ActionResult RequestVacation(VacationRequest model)
{
if(ModelState.IsValid)
{
....
when i dubug the code model.VacationDate contains 01/01/0001 ; although it should be 7/26/2011 whereas Form[VacationDate] contains 26/07/2011 [which is in Fr-BE formate] And ModelState.IsValid is false; although it should be true, as date is correct in fr-be format. when i furtur dig out but checking locals in visual studio i found
this.ModelState[1].Culture = {en-US}
whereas i had already set culture value using actionFilter, as stated above. My question is how can i set this.ModelState.Culture = {fr-be}?