Info
Version: | 1.0.1 |
Author(s): | Edgar |
Last Update: | Tuesday, May 13, 2014 |
.NET Fiddle: | Create the first Fiddle |
NuGet Url: | https://www.nuget.org/packages/DecimalModelBinder |
Install
Install-Package DecimalModelBinder
dotnet add package DecimalModelBinder
paket add DecimalModelBinder
DecimalModelBinder Download (Unzip the "nupkg" after downloading)
Dependencies
1 package depend on this package.
Add the code below to your Global.asax > Application_Start() in order to load the binder in the application start:
ModelBinders.Binders.Add(typeof(decimal), new DecimalModelBinder());
This is the code from http://haacked.com/archive/2011/03/19/fixing-binding-to-decimals.aspx/ with a few changes to work with invariant culture and multiple currency types in the same Model/page.