Chapter 7. Binding Data to .NET User Interfaces
Introduction
This chapter focuses on binding controls to data sources in both Web Forms and Windows Forms.
Web Forms are an ASP.NET—a web application platform—feature used to create user interfaces for web applications. You can use the ASP.NET page framework to create browser- and client device-independent Web Forms that run on a web server and are used to dynamically create web pages. In addition to traditional HTML elements, Web Forms pages acts as a container for server-side controls that implement rich web user interface (UI) functionality in reusable controls.
Windows Forms is the .NET platform for Windows application development providing classes that enable rich user interfaces to be constructed. Windows forms act as a container for reusable controls that implement rich functionality.
Windows and Web Form controls allow data to be displayed by binding
to data sources. Data-binding is typically used for such purposes as
displaying lookup or master-detail data, reporting, and data entry.
There are two types of data binding: simple and complex.
Simple data binding binds a control to a
single data element such as the value of a field in a row of a result
set. Simple binding is used by controls such as the
TextBox and Label.
Complex data binding binds the control to more
than one data element—typically one or more columns from
multiple rows in a result set. Controls capable of complex binding
include ListBox, DataList, and
DataGrid
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access