08.08.2017 Views

designer

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

464 Chapter 14 Using Controls in Web Pages<br />

Using a Standard ASP.NET Server Control<br />

Although you can use HTML controls on all types of Web pages, the real power comes<br />

when you use ASP.NET server controls. ASP.NET server controls appear as ASP.NET options<br />

in the Controls group on the Insert tab and in the Toolbox task pane in the following<br />

groups:<br />

●●<br />

Standard Contains a standard set of controls, such as buttons, check boxes, dropdown<br />

lists, image maps, and calendar and wizard controls.<br />

●●<br />

Data Contains two types of controls: view controls and data source controls.<br />

●●<br />

●●<br />

●●<br />

❍❍<br />

❍❍<br />

View controls allow you to view the content from data sources in sophisticated<br />

grids and lists, very similar to XSLT List View Web Parts (XLVs) and Data<br />

Views.<br />

Data source controls allow you to define a data source.<br />

Before you use a view control, you must insert a data source control on the page.<br />

You then bind the data source control to the view control. You can create a data<br />

source control from a data source in the Data Sources library or use one of the data<br />

source controls in the Data group.<br />

Validation Controls that allow you to validate data entered in a Web form.<br />

Navigation The Menu, SiteMapPath, and TreeView controls in this group allow you<br />

to navigate between pages in a Web site.<br />

Login Controls that support form authentication and allow you to create a membership<br />

system.<br />

In this exercise, you add one of the standard ASP.NET controls, the AdRotator control,<br />

to a Web page. The AdRotator control displays a sequence of images chosen randomly<br />

from a set of images specified in an XML file known as the advertisement file.<br />

SET UP Use the site you modified in the previous exercise. Copy the practice files<br />

in the Chapter14 practice file folder—ADRotator.xml, LucernePublishing.png,<br />

WideWorldImporter.png, and ConsolidatedMessenger.png—to the Site Assets library.<br />

Open the Toolbox and Tag Properties task panes and the ASPControls.aspx page in<br />

the workspace.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!