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
aditya shukla
NA
85
42.1k
Related to Decimal number
Jan 14 2015 5:43 AM
How to allow numbers to 2 decimal in MVC4?
Reply
Answers (
2
)
0
Pradeep Shet
322
5.3k
4.4m
Jan 16 2015 3:33 AM
This will not change in MVC4, it is a concept of C# language. So according to me
string d = "2.4444".ToString("f2");
string.Format("{0:0.00}", "2.4444");
Hope this helps you.
Mark it as answered
0
Vulpes
0
96k
2.6m
Jan 14 2015 6:50 PM
I don't know whether it's different in MVC4 to any other type of .NET application but, if 'd' is any number, the following C# expression will express it as a string to 2 decimal places:
d.ToString("F2")
scroll bar
Create Handler problem in windows application c#