Adding the Control's Data Source

In order to display data within the control, you'll need to set up the data source and retrieve the columns you'll want displayed within the control. The following paragraphs walk you through this process. In this case, in order to display the fields as shown in Figure 19.1, you'll need a SQL string like this:

SELECT EmployeeID, FirstName, LastName,
(FirstName + ' ' + LastName) As Name,
('Images\' + LastName + '.jpg') As PhotoURL, HomePhone
 FROM Employees ORDER BY LastName

This expression retrieves several fields and several expressions based on fields from the Employees table. You'll also need to retrieve the images we've supplied and copy them into the Images folder within your project. Once you've got everything ...

Get ASP.NET Developer's JumpStart 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.