narasiman man

narasiman man

  • NA
  • 0
  • 118.3k

Error input string was not in correct format

Jun 22 2012 2:11 AM


 rent textbox  1000  i  have one button called calculate when i click the calculate button tax amt 100 comes
tax   textbox 100(10  Percentage of rent) which comes 100
grossrent textbox 1100  
 


 then ihave another button  called add for adding rent and tax the result will be fetch in to gross rent.


for that adding rent and tax i written the following code as follows

 int a, b, c;
            a = Convert.ToInt32(txt_rent.Text);
            b = Convert.ToInt32(txt_tax.Text);
            c = a + b;
            txt_grossrent.Text = c.ToString();

when i click the add button error comes

input string was not in correct format.please help me thanks

rgds,
narasimanP





Answers (2)