0

My column name is Total decimal(18, 2) on SQL SERVER,

in my model public Nullable<decimal> Total { get; set; }

and my .cshtml

<div class="form-group">
    @*@Html.LabelFor(model => model.Fatura_Tutar, htmlAttributes: new { @class = "control-label col-md-2" })*@
    <label class="control-label col-md-2">Total </label>
    <div class="col-md-10">

        @Html.EditorFor(model => model.Total , new { htmlAttributes = new { @class = "form-control" } })
        @Html.ValidationMessageFor(model => model.Total , "", new { @class = "text-danger" })
    </div>
</div>

So,When I clicked the edit button "Total " comes like for example "1020,00" and click save it gives validation eror, it must be integer. but if I delete ",00" and like "1020" it will accept. How can I modify my editorfor

Bosco
  • 1,536
  • 2
  • 13
  • 25
jrstudent
  • 1
  • 2

0 Answers0