Binding Data to Single-Value Web Controls

Web controls are divided into two logical categories: single-value controls and multi-value controls. Controls like the TextBox, LinkButton, and Image controls are single-value controls. Those like the DataList, DataGrid, and Repeater controls are multi-value controls. In the next section we'll talk about multi-value controls; in this section we'll look at how we can get data into single-value controls, specifically the TextBox control.

Single-value controls do not have a DataSource property like multi-value controls do. The easiest way to get data into a single-value control is to assign the data value to the appropriate property. For example, you can assign data values to a TextBox.Text property. This ...

Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.