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
Loading
Sandeep Singh ShekhawatPosted Oct 9, 2012, 2:07 AM
Kunal VaishyaPosted Oct 9, 2012, 1:36 AM
//////////////////
// 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);
Santhosh Kumar JayaramanPosted Oct 9, 2012, 1:32 AM
if (chkTax.Checked)
{
double Tax;
double .TryParse ( txtTax.Text.ToString (), out Tax);
taxAmnt = ((fAuctionProfit *Tax) / 100);
}
else