Solved

How to perform calculation

Posted on 2016-10-05
2
31 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
ID: 41830633
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
ID: 41830639
thank you
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

914 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

15 Experts available now in Live!

Get 1:1 Help Now