Guys, I'm trying to calculate my total time textbox by the hourly rate textbox. below is an example of how my total time textbox is being output
totalTime.Text = String.Format("{0:D2}:{1:D2}", diff1.Hours, diff1.Minutes);
I have an hour rate textbox that formats by a number like: 45 I want to multiply the hourly rate by the total time, my code below throws an error, and I'm sure it's to do with the formatting?
int label10 = 0;
int label11 = 0;
label10 = Convert.ToInt32(labTxt.Text);
label11 = Convert.ToInt32(totalTime.Text);
int total = label10 * label11;
netLab.Text = total.ToString("F2");
Multiply date value by Number value
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

VulpesRank #55 · 29.2K reputationPosted Jul 18, 2011, 12:33 AM EDT
mike DelvottiRank #7,298 · 244 reputationPosted Jul 18, 2011, 1:56 AM EDT