anil john

anil john

  • NA
  • 156
  • 210.5k

error on clearing textbox

Oct 9 2012 2:25 AM
I am getting an error : Input string not in correct format , while am clearing the text box, plz help me to rectify this error

double taxAmnt =0;

private void textBox2_TextChanged(object sender, EventArgs e)

        {

            if (chkTax.Checked)

            {

                taxAmnt = ((fAuctionProfit * Convert.ToDouble(txtTax.Text)) / 100);

            }

            else

            {

                taxAmnt = Convert.ToDouble(txtTax.Text);

            }

            txtNetProfit.Text = (fAuctionProfit - taxAmnt - bonusAmnt-serviceChrg ).ToString ();

        }


Answers (3)