Thousand Seperator

AFAIK, There are two ways to convert the normal numeric value to the numeric value with thousand seperator.
First way can be written in codebehind file as mention below.

Dim nfi As NumberFormatInfo = New CultureInfo("en-us", False).NumberFormat
Dim myint As Int64
Console.WriteLine(myint.ToString("N", nfi))

Other way is that formatting the datafield in databound control(i.e; repeater) by using “{0:N}” code.

<td align=”right” nowrap=”true”>&nbsp;<%# DataBinder.Eval(Container.DataItem, “BalAmount”,”{0:N}”) %></td>

One thought on “Thousand Seperator

Leave a Reply

Your email address will not be published. Required fields are marked *