Separate decimal as currency

9/11/2016 MVC
3819

I stored my Currency as decimal in database , when it is shown in View of mvc, contain 2 decimal , for example 2000 show as 2000.00 ,but i want show this value as curency with separate 3 by 3 , I founded many string format in Internet , in continue i will show two of theme

one of these way is to use DataAnnotationsas in Model class :

 

[DisplayFormat(DataFormatString = "{0:C0}")]

 or we can write directly on view as this code

          <div class="col-md-5" style="font-family: 'samim'">
                  @item.Price.ToString("C0") Doler 
          </div>

in this way after the currency we will see $ sign without seperate and i do n't want to show $ sign,i use this 

 <div class="col-md-5" style="font-family: 'samim'">
                            @item.Price.ToString("n0")    Daller
                        </div>

 it was good for me .