The server is hosting Asp.net mvc3 app and the Browser culture is set to da (Danish)
GET request url: /get?d=1.1 (note that the decimal separator is .)
return: da;1,1 (note that the decimal separator is ,)
GET request url: /get?d=1,1 (the decimal separator is ,)
return: Exception Details: System.ArgumentException: The parameters dictionary contains a null entry for parameter 'd' of non-nullable type 'System.Decimal' for method 'System.Web.Mvc.ContentResult get(System.Decimal)' in 'Intranet.Controllers.OrderController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter. Parameter name: parameters
But given the same input to a post request, the results are exactly opposite.
POST request url: /get2 (form data d=1.1)
return: Exception ...
POST request url: /get2 (form data d=1,1)
return: da;1,1
I suppose the POST request is working as expected. But why does the GET request behave differently? How does the default model binder work in this case.