Hi celv,
I have created sample that full-fill your requirement.
HTML
<asp:TextBox ID="txtAmount" runat="server" AutoPostBack="true" OnTextChanged="OnTextChanged" />
Code
protected void OnTextChanged(object sender, EventArgs e)
{
double amount = Convert.ToDouble(txtAmount.Text.Trim());
txtAmount.Text = amount.ToString("#,##0");
}
Hope this will resolve your issue.