title: Why doesn't my Input of type=number show a decimal when used with ASP.NET MVC?
body: <p>I'm trying to use a input number in MVC, it accepts correctly the comma (I'm in a culture with a comma as a decimal separator) and MVC accepts it with the custom binder I made. The value is correctly saving in database, and comes back.</p>
  
  <p>The problem is, when passing the decimal value, which looks like 0.231 to the number control, I guess it tries to format it to my culture with a comma and doesn't work, so nothing appears. </p>
  
  <p>The binder works on return to server, but do I need something else on the return to the control for it to work on the return to the page?</p>
  
  <p>My control in the razor view:</p>
  
  <pre><code>@Html.EditorFor(model =&gt; model.DecimalValueForExample, new { htmlAttributes = new { @class = "form-control", @type = "number", @step = "any", @min = "0.001", autocomplete = "off" } })
  </code></pre>
  
  <p>My attribute in the viewmodel:</p>
  
  <pre><code>        [Display(Name = "DecimalValueForExample", ResourceType = typeof(Properties.Resources))]
          [DisplayFormat(DataFormatString = "{0:0.###}", ApplyFormatInEditMode = true)]
          [Range(0.001, double.MaxValue, ErrorMessageResourceName = "RangeErrorMessage", ErrorMessageResourceType = typeof(Properties.Resources))]
          [Required]
          public decimal DecimalValueForExample{ get; set; }
  </code></pre>