Question: What I need is if 5000 ----> 5000.00
 if 5000.985 ----> 5000.99

always there should be a two decimal places.

This is my model class.

```
    [Display(Name = "Price (Rs.)")]
    public double price { get; set; }

```

This is my cshtml page (View).

```
        <div class="display-label">
              @Html.DisplayNameFor(model => model.price)
        </div>

```

Answer: 
You can also do this with an annotation.

```cs
[DisplayFormat(DataFormatString = "{0:n2}", ApplyFormatInEditMode = true)]

```

See [this answer](https://stackoverflow.com/a/6121625/4972749) for more information
```
<div class="display-label">
      @Math.Round(model=>model.price, 2)
</div>

```

and you'd better use "decimal" not "double"