Hey micah,
Please refer below sample.
HTML
<div>
Inetger Amount:
<asp:Label ID="lblAmountInteger" runat="server" /><br />
Decimal Amount:
<asp:Label ID="lblAmountDecimal" runat="server" />
</div>
Namespaces
C#
using System.Globalization;
VB.Net
Imports System.Globalization
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
int amountInInteger = 1200000;
double amountIndecmal = 1200000.00;
string amountInInetgerFormat = amountInInteger.ToString("#,##0");// for integer value
string amountInDecimalFormat = amountIndecmal.ToString("N", new CultureInfo("en-US"));// for decimal value
lblAmountInteger.Text = amountInInetgerFormat;
lblAmountDecimal.Text = amountInDecimalFormat;
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim amountInInteger As Integer = 1200000
Dim amountIndecmal As Double = 1200000.0
Dim amountInInetgerFormat As String = amountInInteger.ToString("#,##0")
Dim amountInDecimalFormat As String = amountIndecmal.ToString("N", New CultureInfo("en-US"))
lblAmountInteger.Text = amountInInetgerFormat
lblAmountDecimal.Text = amountInDecimalFormat
End Sub
Namespaces
Inetger Amount: 1,200,000
Decimal Amount: 1,200,000.00