Click here to Skip to main content
15,890,947 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

Can someone help me adding two text box without clicking a button.
example:
VB
textbox1 = (1)
textbox2 =(50)
textboxsum = (51) <--- automated sum from textbox1 and textbox2


i have already values on textbox1 and textbox2, I want the two values of textbox automatically computed on textboxsum.

textbox1 and text2 values came from my database.



thanks in advance

What I have tried:

Note:
textchange event works but i need to manually input the values on text box in order to get the sum.
Posted
Updated 2-Apr-19 2:09am
v2

1 solution

I would implement the TextChange-Event on the both of the textbox1 and textbox2 like this:

VB
Try
  textboxsum.Text = Convert.toInt32(textbox1.Text) + Convert.toInt32(textbox2.Text)
Catch ...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900