Click here to Skip to main content
16,018,394 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,


i have to show my number example 300000 as 3,00,000.00 in java script eval.present now i was getting like this 401,764.00 '<%#Eval("SUMINSURED","{0:n}") %>'


regards,
rahul .
Posted

1 solution

C#
$(document).on('keyup', '.test', function() {
    var x = $(this).val();
    $(this).val(x.toString().replace(/,/g, "").replace(/\B(?=(\d{3})+(?!\d))/g, ","));
});


Refer:http://stackoverflow.com/questions/16902924/javascript-number-formatting-with-commas[^]

Hope this may help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900