Use String.Format ( ) in ASP.NET to format text or currency or numbers
string message = String.Empty;
string name = "Bill";
string[] type = { "Balance", "Credit", "Debt" };
double value = 7385556.71d;
int days = 134;
message += String.Format("Hello {0},<br />Your {1} is {2:C}, <br />Your last login was done {3:G} days ago", name, type[1], value, days);
LiteralMessage.Text = message;
The result:
Hello Bill,
Your Credit is $7,385,556.71,
Your last login was done 134 days ago
This example uses {2: C} to format value as Currency and {3: G} to format days which is an integer value as General, without commas or dots