Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Thousand Seperator

Thousand Seperator

Scheduled Pinned Locked Moved C#
tutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sasmi_Office
    wrote on last edited by
    #1

    Hi Friends, I am using a repeater control which have footer. i have placed a asp:label control in the footer. When i run the page label is showing its value like "1234.00" but i want to display like "1,234.00". How to do that. Thanks in advance. Regards, Gourav Tyagi.

    realJSOPR L 2 Replies Last reply
    0
    • S Sasmi_Office

      Hi Friends, I am using a repeater control which have footer. i have placed a asp:label control in the footer. When i run the page label is showing its value like "1234.00" but i want to display like "1,234.00". How to do that. Thanks in advance. Regards, Gourav Tyagi.

      realJSOPR Offline
      realJSOPR Offline
      realJSOP
      wrote on last edited by
      #2

      string valueString = string.Format("{0:0,0.00}", myValue);

      .45 ACP - because shooting twice is just silly
      -----
      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
      -----
      "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

      1 Reply Last reply
      0
      • S Sasmi_Office

        Hi Friends, I am using a repeater control which have footer. i have placed a asp:label control in the footer. When i run the page label is showing its value like "1234.00" but i want to display like "1,234.00". How to do that. Thanks in advance. Regards, Gourav Tyagi.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        Something like this?

        using System.Globalization

        CultureInfo ci = new CultureInfo("es-ES");
        NumberFormatInfo myFormat = ci.NumberFormat;
        myFormat.NumberGroupSeparator = ",";
        myFormat.NumberDecimalDigits = 2;
        string MyFormattedString = MyDoubleValue.ToString("N", myFormat);

        The endusers' culture should determine how the number is formatted. That's usually configured in the Windows regional settings.

        I are Troll :suss:

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups