Ahad Murtaza
Ahad Murtaza

Reputation: 71

How to copy one textfield to another textfield dynamically in vb.net?

How can I copy one textfield to another textfield dynamically in vb.net?

For example when I write something in text field 1 then it would also show at the same time in text field 2.

Upvotes: 1

Views: 67

Answers (1)

Alex B.
Alex B.

Reputation: 2167

Use TextChanged event on first text box and in the event handler set text of second textbox:

Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
      TextBox2.Text = TextBox1.Text
End Sub

Upvotes: 2

Related Questions