TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
eliza sahoo
NA
41
0
Formating the string before displaying in ASP.NET
Apr 29 2010 6:05 AM
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.
Reply
Answers (
0
)
retreiving images from database and display as thumbnail images
Formating the string before displaying in ASP.NET