my problem is cannot able to write any number in commission textbox (textbox1) and display result in textbox2 that represent commision rate .
commision rate = (commission/amount ) * 100
I have 3 text boxes
textbox1 : represent Commission
Commission=(amount * rate)/100
textbox2 : represent CommissionRate
CommissionRate=(Commission/amount)*100
txtLgAmount represent amount
- private void textBox1_TextChanged(object sender, EventArgs e)
- {
- if (!string.IsNullOrEmpty(textBox1.Text) && !string.IsNullOrEmpty(txtLgAmount.Text))
- {
- textBox2.Text = ((Convert.ToDecimal(textBox1.Text) / Convert.ToDecimal(txtLgAmount.Text))*100).ToString();
- }
- else
- {
- textBox2.Text = "";
- }
- }
image problem attached below
Ramesh PalanivelPosted Dec 20, 2017, 2:35 AM