You must Sign In to post a response.
  • Category: ASP.NET

    Comma separated value in amount field

    Hi to all....

    In my application i process the cash book register.... when i show the report the amount value is getting from backend and show that in frontend.... i want to show the amount just like comma separated....

    for ex

    1. transfer 1,10,234.00
    2. deposit 100.00
    3. withdrawal 10,000.00


    I want to show just like amount value.... how can i do this in c#.... any other way is available let me know.......
  • #680336
    public static function formatNumber(number:Number):String
    {
    var numString:String = number.toString()
    var result:String = ''

    while (numString.length > 3)
    {
    var chunk:String = numString.substr(-3)
    numString = numString.substr(0, numString.length - 3)
    result = ',' + chunk + result
    }

    if (numString.length > 0)
    {
    result = numString + result
    }

    return result
    }
    Try like this


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.