I have a table associating an ID with a client's forename and surname (two separate fields). I have a TextBox on my form for a user to enter a client ID and I'd like a live update of the name displayed on a label, e.g.:
TextBox: 1 --> Label: "Sam Pell" (user types 1)
TextBox: 12 --> Label: "Andy Other" (user types 2)
I have two questions, really - I'm new to databinding in .NET:
- How can I make the contents of the TextBox update the displayed name on the Label?
- How can I display two separate fields (concatenated) within a single Label control?
I am currently using the Visual Studio data binding components; namely a BindingSource
, TableAdapter
and DataSet
.