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. Web Development
  3. ASP.NET
  4. Format String

Format String

Scheduled Pinned Locked Moved ASP.NET
6 Posts 5 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.
  • B Offline
    B Offline
    banker_kiran
    wrote on last edited by
    #1

    Hi, I have one value 10000000 and i want to display like Rs.1,00,00,000

    kiran banker

    I A S S 4 Replies Last reply
    0
    • B banker_kiran

      Hi, I have one value 10000000 and i want to display like Rs.1,00,00,000

      kiran banker

      I Offline
      I Offline
      InsDev
      wrote on last edited by
      #2

      use in this way . String.Format("{0:C}", integer); Devjit Das.

      A 1 Reply Last reply
      0
      • B banker_kiran

        Hi, I have one value 10000000 and i want to display like Rs.1,00,00,000

        kiran banker

        A Offline
        A Offline
        Abhijit Jana
        wrote on last edited by
        #3

        if you want to display in text box you can use Masktext box and user your custom format of string :)

        Best Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"

        1 Reply Last reply
        0
        • B banker_kiran

          Hi, I have one value 10000000 and i want to display like Rs.1,00,00,000

          kiran banker

          S Offline
          S Offline
          Sandeep Akhare
          wrote on last edited by
          #4

          just look at it long tr=1000000; TextBox1.Text = tr.ToString("##,###");

          Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

          1 Reply Last reply
          0
          • I InsDev

            use in this way . String.Format("{0:C}", integer); Devjit Das.

            A Offline
            A Offline
            Abhijit Jana
            wrote on last edited by
            #5

            it's Coming with "$" sign

            Best Regards ----------------- Abhijit Jana View My CodeProject Articles "Success is Journey it's not a destination"

            1 Reply Last reply
            0
            • B banker_kiran

              Hi, I have one value 10000000 and i want to display like Rs.1,00,00,000

              kiran banker

              S Offline
              S Offline
              Samariya prakash
              wrote on last edited by
              #6

              Function IndiaRupees(ByVal rs As String) Dim str As String = "" str = Right(rs, 3) rs = Left(rs, IIf(rs.Length > 3, rs.Length - 3, 0)) While rs <> "" str = Right(rs, 2) & "," & str rs = Left(rs, IIf(rs.Length > 2, rs.Length - 2, 0)) End While IndiaRupees = "Rs. " & str End Function Prakash Samariya

              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