Display the Amount in thousands and hundreds format in c#
if you convert these values in thousands and hundreds format.then this amount look like this 1,23,456.Its very simple conversion. just add this code.
In c#,
Add this code in .cs
txtAmount.Text = totalamount.ToString("#,##0.##");
If you want to convert this value in design mode it self.then just add this code
<%# Eval("totalamount", "{0:n}")%>
OUTPUT:1,23,456
That's it..I hope this will helps.
Labels: .Net Tutorials, Aspnet, C#
<< Home