Solved

How to perform calculation

Posted on 2016-10-05
2
24 Views
Last Modified: 2016-10-05
Hi,

I have a resulted value from db, such as

PricePerSqFt.Text = String.Format("{0:$#,##0.00}", reader["PSF"]);

Before I convert it into string, I need to perform some formula to the value, say, I want to * 100 to "PSF".  How can I do this?  thanks
0
Comment
Question by:mcrmg
2 Comments
 
LVL 20

Accepted Solution

by:
Russ Suter earned 500 total points
Comment Utility
Assuming the value of reader["PSF"] is a double?
PricePerSqFt.Text = String.Format("{0:$#,##0.00}", Convert.ToDouble(reader["PSF"]) * 100);

Open in new window

You can convert to other data types as needed.
0
 

Author Closing Comment

by:mcrmg
Comment Utility
thank you
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now