1.11M Members

Total price Increment

 
0
 

I have a different buttons for each item i have, each buttons has a function of which compute total price of item versus the quantity that have been entered in the textbox qty and summing all the total bill of all items to textbox3 or totalbilltext. but it seems that only value that appearing to the textbox3 is the (qtyprice) not the value of the totalbill+=qtyprice. T_T help.

 Protected Sub Button1_Click(sender As Object, e As System.EventArgs) Handles Button1.Click
        a = TextBox1.Text
        b = a * 2
        tb += b
        TextBox3.Text = tb

    End Sub

    Protected Sub Button2_Click(sender As Object, e As System.EventArgs) Handles Button2.Click
        a1 = TextBox2.Text
        b1 = a1 * 4
        tb += b1
        TextBox3.Text = tb
    End Sub
 
0
 

Then it appears that the value of tb is 0 before you add in the value of b.

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: