Convert Number to string with Thousand Separator in C# and VB.Net

Last Reply 10 months ago By pandeyism

Posted 10 months ago

how can i format figures like 1200000 to something like money figures with comers like 1,200,000

    protected void ddlcuomerphone_SelectedIndexChanged(object sender, EventArgs e)
        DataTable dt = GetDataTable("SELECT SUM (Debt) Debt FROM CustomerDetail WHERE CustomerPhone = '" + ddlcuomerphone.SelectedItem.Text.Trim() + "'");
        lbldebt.Text = dt.Rows[0]["Debt"].ToString();


<asp:Label ID="Label2" runat="server" Text=" Total Debt /" Font-Size="Large" ForeColor="#CC3300"></asp:Label>
<asp:Label ID="lbldebt" runat="server" Font-Size="Large" ForeColor="#006600" />


<p class="">
<asp:DropDownList ID="ddlcuomerphone" runat="server" OnSelectedIndexChanged="ddlcuomerphone_SelectedIndexChanged"
    AutoPostBack="True" AppendDataBoundItems="true" CssClass="btn btn-default dropdown-toggle">
    <asp:ListItem Text="Select Customer Unique Phone Number" Value=""></asp:ListItem>


This question does not have replies marked as Answer.