I want to separate the numbers with a comma as follows. How can it be done?
number display
---------- ------------
1.00 1
1.20 1.20
1234 1,234
1234.89 1,234.89
i use from:
@Html.TextBox("", FormattedValue, new { @class = "form-control text-center
number", lang = "en" })
<script>
$('.number').priceFormat({
prefix: '',
thousandsSeparator: ',',
insertPlusSign: '',
centsLimit: 2,
});
</script>
but This code always displays numbers with two decimal places, even if the decimal point is zero