MVC parameter binding

By eidias on (tags: mvc, categories: code)

Here’s a piece of information that will hopefully save you the time I spent on trying to figure it out… asp.net mvc parameter binding is localizable ONLY in the case of POST form action.

So if you’re trying to bind a date time, and have globalization turned on in web.config, then you need to parse the parameter yourself. The parameter needs to be of type string, because making it DateTime (ish) will not result in what the url or route holds.

Big thanks to to Sam for the answer that can be found here.

Cheers