Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Reply
Formating the string before displaying in ASP.NET
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
eliza sahoo
14y
2.1k
1
Reply
I
n Some
cases
while displaying a large number it will be nice if we can format the number to a more readable format
Like : Reputation Point : 537456
Can be more readable if we can write it as Reputation Point : 537,456
ASP.NET provide features like String.Format(format,arg0) to format arguments into different forms.
For above solution you can implement
Response.Write(String.Format("{0:#,###}", 123456789));
Which will print 123,456,789
{0:#,###}
? Known as the format string where "{ ,}"are compulsory to mentation.
The first part before ':' represent the argument number & it will be an integer.
The second part after ':' represent the format that you want your argument to be converted.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Formating the string before displaying in ASP.NET
Please explain Global.asax file