I have a problem with decimal numbers.
If I use. (dot) instead of, (comma) in a text field, it is null in the controller.
I know his problem in the language, because in Spanish we use a comma instead of a period for decimal places, but I need to use a period.
Is it possible to change this?
This is strange because in the controller I have to use. (dot) for decimal points ie:
I can do it float x = 3.14, but I can’t do it float x = 3,14, so I don’t understand this ... In some cases I have to use a period ... In others I have to use a comma ...
This is my code:
In the model:
[Display(Name = "Total")]
public double Total { get; set; }
In sight:
@Html.EditorFor(model => model.Total, new { id = "Total", htmlAttributes = new {@class = "form-control" } })
In the controller:
public ActionResult Create([Bind(Include = "ID,Codigo,Fecha,Trabajo,Notas,BaseImponible,Iva,Total,Verificado,FormaDePagoID,ClienteID")] Presupuesto presupuesto)
{