Can any one please suggest me how to format a number in to 0000000.00 format

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • naveenkenexa
    New Member
    • Oct 2007
    • 3

    Can any one please suggest me how to format a number in to 0000000.00 format

    Can any one please suggest me how to format a number in to 0000000.00 format
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Here is an article that may help:
    <asp:GridView > Control

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      Use the .ToString() function (and it's variants in particular) with the numberformat string.
      Look it up in MSDN

      Comment

      • GayathriP
        New Member
        • Oct 2007
        • 17

        #4
        You can use the following code to format a number in desired format

        int a =12345;
        MessageBox.Show (a.ToString("#0 000000.00#"));

        The Output will be 0012345.00

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          Is this a desktop application or an asp.net application question?

          Comment

          Working...