I am getting an error : Input string not in correct format , while am clearing the text box, plz help me to rectify this error
if (chkTax.Checked)
{
taxAmnt = ((fAuctionProfit *double .Parse ( txtTax.Text.ToString ())) / 100);
}
else
Input string not in correct format
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Santhosh Kumar JayaramanRank #563 · 4.3K reputationPosted Oct 8, 2012, 9:32 PM EDT
if (chkTax.Checked)
{
double Tax;
double .TryParse ( txtTax.Text.ToString (), out Tax);
taxAmnt = ((fAuctionProfit *Tax) / 100);
}
else
Kunal VaishyaRank #990 · 2K reputationPosted Oct 8, 2012, 9:36 PM EDT
//////////////////
// Make Sure txtTax.Text is not Null or Character
taxAmnt = ((Convert.ToDouble(fAuctionProfit) * Convert.ToDouble( txtTax.Text.ToString())) / 100);
//Or
taxAmnt = Convert.ToDouble((Convert.ToDouble(fAuctionProfit) * Convert.ToDouble( txtTax.Text.ToString())) / 100);
Sandeep Singh ShekhawatRank #147 · 15.6K reputationPosted Oct 8, 2012, 10:07 PM EDT