Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 3. Building Data Entry Forms > Binding a TextBox to Data

3.1. Binding a TextBox to Data

When you are binding data, you will need the BindingSource object available while the form is open, and you will also need a couple extra controls on the form. So, for this example, you just need to put a label (named label1), a text box (named textbox3), and a button (named button4) on the form. It really doesn’t matter where you put them for this example, but in the screenshot, you will see that I put them at the bottom of the form. To make the BindingSource object available, you need to put the following line of code up where you are defining variables at the class level:

public BindingSource bndSource;


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial