3
Reply

error on clearing textbox

anil john

anil john

Oct 9 2012 2:25 AM
1.4k
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)