Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8409061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:48:15+00:00 2026-06-09T23:48:15+00:00

I have a decimal value for example: 59625879,00 I want to show this value

  • 0

I have a decimal value for example: 59625879,00

I want to show this value like this: 59.625,879 or 59625,879

How can I do this with @Html.DisplayFor(x => x.TAll, String.Format()) ?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:48:17+00:00Added an answer on June 9, 2026 at 11:48 pm

    Decorate your view model property with the [DisplayFormat] attribute and specify the desired format:

    [DisplayFormat(DataFormatString = "{0:N}", ApplyFormatInEditMode = true)]
    public decimal TAll { get; set; }
    

    and then in your view:

    @Html.DisplayFor(x => x.TAll)
    

    Another possibility if you don’t want to do this on the view model you could also do it inside the view:

    @Model.tAll.ToString("N")
    

    but I would recommend you the first approach.


    Yet another possibility is to write a custom display template for the decimal type (~/Views/Shared/DisplayTemplates/MyDecimalTemplate.cshtml):

    @string.Format("{0:N}", Model)
    

    and then:

    @Html.DisplayFor(x => x.TAll, "MyDecimalTemplate")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an editable cell which contain decimal value for example 2.123456 (6 place
I have a price textbox and I want to get a decimal value with
We have Edittext which can take Decimal value. So I have used android:inputType=numberDecimal android:numeric=decimal
For example, I want to print this number A0090000(16) in unsigned decimal number in
I have a textbox that gets a decimal value say 10500.00 the problem is
I have been successful at rounding my value to one decimal point, but I
Hi I have a List<decimal> containing values between ]0;1]. I want to check if
If I have a nullable decimal? d and I want to assign d to
Is there an easy way to present time (hh:mm) as a decimal value? Example,
I want to round all of my numbers to 1 decimal place. For example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.