Adding Data Controls

ASP.NET 4.0 offers a number of data controls that can be used to bind a data source to user controls and that act like a bridge. One of the controls new in ASP.NET 4.0 is the EntityDataSource, which enables binding an entity data model to a graphic control.

Enabling the Designer

By default Visual Studio shows the HTML code for the pages. In order to enable the Visual Studio designer, click the Design button for switching to the full designer view or the Split button in order to get both the designer and the html code on the same view.

In the toolbox expand the Data tab and drag the EntityDataSource control onto the Orders page until you get the result shown in Figure 37.5.

Figure 37.5 Adding an EntityDataSource control ...

Get Visual Basic® 2010 Unleashed 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.