DecimalModelBinder 1.0.1
dotnet add package DecimalModelBinder --version 1.0.1
NuGet\Install-Package DecimalModelBinder -Version 1.0.1
<PackageReference Include="DecimalModelBinder" Version="1.0.1" />
paket add DecimalModelBinder --version 1.0.1
#r "nuget: DecimalModelBinder, 1.0.1"
// Install DecimalModelBinder as a Cake Addin #addin nuget:?package=DecimalModelBinder&version=1.0.1 // Install DecimalModelBinder as a Cake Tool #tool nuget:?package=DecimalModelBinder&version=1.0.1
**IMPORTANT**
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.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on DecimalModelBinder:
Package | Downloads |
---|---|
CurrencyFor.HTMLHelper
Currency HTML Helper for handling decimal currency fields. Uses JQuery for mask. |
GitHub repositories
This package is not used by any popular GitHub repositories.