Kanhialal kk

Kanhialal kk

  • NA
  • 234
  • 333.7k

Confusion in calculation of textbox value?

Jun 29 2011 2:16 AM
Hi..

I have two textboxs in my application both works on numbers

One is NetTotal textbox which is already filled with 100 value..

An other is OtherCharge  textbox which will filled on need..

Suppose I type any amount in OtherCharge textbox and  that it is adding in NetTotal textbox as bellow

NetTotal.Text = (Convert.ToInt32(NetTotal.Text) + Convert.ToInt32(OtherCharge.Text)).ToString();

But problem is that if I replace any digit from otherCharge textbox through backspace ontextchanged event..

like I have typed 90 in OtherCharge Textbox than netTotal.text=190
but if i replace 0 than value should be 109 instead of 190 so how it is possible...

please help me..


Answers (3)