In database I have a PRICE field type of float with value 54342.76 and I want to display it on gridview as 54,342.76. How can format this values?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try
You could use
cspecifier instead, however it prints currency sign also.Use
CultureInfo.InvariantCultureas in some localizations,thousands separator may be missing.Also read Decimal.ToString Method, Standard Numeric Format Strings, Custom Numeric Format Strings