S
H
A
R
E

Tuesday, July 05, 2011

Basic Concept of Databindings

Language: VB.net
Add two Textbox in your form, and then add this code when Form Load:

        ' When Textbox1 text changed, then Texbox2 too
        TextBox2.DataBindings.Add(New Binding("text", TextBox1, "text"))

        ' When Textbox2 text changed, then Texbox1 too
        TextBox1.DataBindings.Add(New Binding("text", TextBox2, "text"))


the two Textbox Will Also have same text.

0 comments:

Post a Comment