i have one filed cost is 1000 and another field currencyvalue 10 and another field netcost in that i want to multiply 1000 and 10 i want 10000 answer in net cost field. how to do.
cost in textbox3.text(1000)
currency value in textbox4.text(10)
Net cost in textbox5.text i want 10000 answer.
i want to multiply textbox3.text(1000) and textbox4.text(10) and answer come in to textbox5.text(1000)
how to do please help me.
Loading
Suthish NairPosted Jan 9, 2012, 6:37 AM
decimal d3 = 0M;
if (!String.IsNullOrEmpty(TextBox2.Text.Trim()))
Decimal.TryParse(TextBox2.Text.Trim(), out d3);
//if (!Decimal.TryParse(TextBox2.Text.Trim(), out d3))
// throw new FormatException("TextBox2 - IsNullOrEmpty");
decimal d4 = 0M;
if (!String.IsNullOrEmpty(TextBox3.Text.Trim()))
Decimal.TryParse(TextBox3.Text.Trim(), out d4);
//if (!Decimal.TryParse(TextBox3.Text.Trim(), out d4))
// throw new FormatException("TextBox3 - IsNullOrEmpty");
TextBox4.Text = Convert.ToString(d3 * d4);
Satyapriya NayakPosted Jan 8, 2012, 11:48 AM
private void button1_Click(object sender, EventArgs e)
{
textBox5.Text = (decimal.Parse(textBox3.Text) * decimal.Parse(textBox4.Text)).ToString();
}
Thanks
VulpesPosted Jan 8, 2012, 11:09 AM