I have a register, where I have some fields to insert values, but the same is only accepting integer, if you add some value with zero decimal.
Controller
[Display(Name = "Valor Multiplicador para Opção 01:")]
[DisplayFormat(DataFormatString = "{0:0,0.00}", ApplyFormatInEditMode = true)]
public double VALOR01 { get; set; }
View
<!-- language: lang-html -->
@using (Html.BeginForm("Index", "CadastroPossibilidade", FormMethod.Post))
{
<div class="row">
<div class="container">
<div class="col-md-3 form-group">
@Html.HiddenFor(c => Model.IDPOSSIBILIDADE)
@Html.LabelFor(c => Model.DESCRICAO01)
@Html.TextBoxFor(c => Model.DESCRICAO01, new { placeholder = "descrição", @class = "form-control" })
</div>
<div class="col-md-3 form-group">
@Html.LabelFor(c => Model.VALOR01)
@Html.TextBoxFor(c => Model.VALOR01, new { placeholder = "0", @class = "form-control" })
</div>
<div class="col-md-3 form-group">
@Html.LabelFor(x => x.IDTITULOPOSS)
@Html.DropDownListFor(x => x.IDTITULOPOSS, ViewBag.TituloPos as SelectList, new { @class = "form-control" })
@Html.ValidationMessageFor(x => x.IDTITULOPOSS)
</div>
</div>
</div>
}