I'm getting some trouble binding a date from QueryString :
I have the following model
public class QueryParms
{
public DateTime Date { get; set; }
}
And the following controller action :
public ActionResult Search( QueryParms query );
I have a form, with a field where I can type my date. If the form is FormMethod.Post, everything is fine, my date is correctly bound to my model.
If the form is FormMethod.Get, it is not working anymore. The date is left to the default value (01/01/0001)
I think it is a culture issue : When i look into the value provider, the FormValueProvider has a culture property set for my date : {fr-FR}. The QueryStringValueProvider doesn't have the culture property set.
Is there a way to set this property ?