Unable to display up to 4 decimal places on web page

  Kiến thức lập trình

I’m having trouble displaying a fractional number on a web page. The value of this number is0.0005, but it just displays as 0.

In my entity model

[DisplayName("Quantity Multiplier")]
[DisplayFormat(DataFormatString = "{0:0.######}", ApplyFormatInEditMode = true)]
[UIHint("None")]
public double Multiplier { get; set; }

In my markup

<td>@Html.DisplayFor(m => conversion.Multiplier)</td>

Displayed in Browser

Can anyone see what I’m missing to display this value as 0.0005?

Note: I do have a custom display template for double that limits the number of decimal places. However, my use of UIHint() here is meant to prevent that from having any effect.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT