Private Sub txtamount_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtamount.TextChanged
If String.IsNullOrEmpty(txtquantity.Text) OrElse String.IsNullOrEmpty(txtamount.Text) Then Exit Sub
If Not IsNumeric(txtquantity.Text) OrElse Not IsNumeric(txtamount.Text) Then Exit Sub
txttotal.Text = CDbl(txtquantity.Text) * CDbl(txtamount.Text)
End Sub
Private Sub txtquantity_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtquantity.TextChanged
If String.IsNullOrEmpty(txtquantity.Text) OrElse String.IsNullOrEmpty(txtamount.Text) Then Exit Sub
If Not IsNumeric(txtquantity.Text) OrElse Not IsNumeric(txtamount.Text) Then Exit Sub
txttotal.Text = CDbl(txtquantity.Text) * CDbl(txtamount.Text)
End Sub
Private Sub txttotal_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txttotal.TextChanged
If Len(Trim(txtquantity.Text)) = 0 And Len(Trim(txtamount.Text)) = 0 Then
txttotal.Text = ""
End If
End Sub
Here's my code, the amount and quantity works fine. But everytime I delete the value of quantity and amount in textbox , the total still display the previous answer...