3
Answers

error on clearing textbox

Ask a question
anil john

anil john

11y
1.4k
1
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)