15.02.2015 Views

C# 4 and .NET 4

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

asP.neT Web forms ❘ 1161<br />

ConTrol<br />

Table<br />

BulletedList<br />

HiddenField<br />

Literal<br />

Calendar<br />

AdRotator<br />

FileUpload<br />

Wizard<br />

Xml<br />

MultiView<br />

Panel<br />

PlaceHolder<br />

View<br />

desCriPTion<br />

Specifies a table. Use this in conjunction with TableRow <strong>and</strong> TableCell at<br />

design time, or programmatically assign rows using the Rows property of type<br />

TableRowCollection. You can also use this property for runtime modifications. This<br />

control has several styling properties unique to tables, as do TableRow <strong>and</strong> TableCell.<br />

Formats a list of items as a bulleted list. Unlike the other list controls, this one has a<br />

Click event that you can use to determine what item a user has clicked during a postback.<br />

Other properties <strong>and</strong> events are the same as for DropDownList.<br />

Used to provide a hidden field, to store nondisplayed values for any reason. These<br />

can be very useful to store settings that would otherwise need an alternative storage<br />

mechanism to function. Use the Value property to access the stored value.<br />

Performs the same function as Label, but has no styling properties because it derives<br />

from Control, not WebControl. You set the text to display for this control with the<br />

Text property.<br />

Allows the user to select a date from a graphical calendar display. This control has<br />

many style-related properties, but essential functionality can be achieved using the<br />

SelectedDate <strong>and</strong> VisibleDate properties (of type System.DateTime) to get<br />

access to the date selected by the user <strong>and</strong> the month to display (which will always<br />

contain VisibleDate). The key event to hook up to is SelectionChanged. Postback<br />

from this control is automatic.<br />

Displays several images in succession, with a different one displayed after each server<br />

round trip. Use the AdvertisementFile property to specify the XML file describing<br />

the possible images, <strong>and</strong> the AdCreated event to perform processing before each<br />

image is sent back. You can also use the Target property to name a window to open<br />

when an image is clicked.<br />

This control presents the user with a text box <strong>and</strong> a Browse button, such that a<br />

file to be uploaded can be selected. After the user has done this, you can look at<br />

the HasFile property to determine if a file has been selected, <strong>and</strong> then use the<br />

SaveAs() method from code-behind to perform the file upload.<br />

An advanced control used to simplify the common task of getting several pages of user<br />

input in one go. You can add multiple steps to a wizard, which can be presented to a<br />

user sequentially or nonsequentially, <strong>and</strong> rely on this control to maintain state <strong>and</strong> so on.<br />

A more complicated text display control, used for displaying XML content, which<br />

may be transformed using an XSLT style sheet. The XML content is set using one of<br />

the Document, DocumentContent, or DocumentSource properties (depending<br />

on the format of the original XML), <strong>and</strong> the XSLT style sheet (optional) using either<br />

Transform or TransformSource.<br />

A control that contains one or more View controls, where only one View is rendered<br />

at a time. The currently displayed view is specified using ActiveViewIndex, <strong>and</strong><br />

you can detect if the view changes (perhaps because a Next link on the currently displayed<br />

view is clicked) with the ActiveViewChanged event.<br />

Adds a container for other controls. You can use HorizontalAlign <strong>and</strong> Wrap to<br />

specify how the contents are arranged.<br />

This control doesn’t render any output but can be h<strong>and</strong>y for grouping other controls<br />

together, or for adding controls programmatically to a given location. Contained controls<br />

can be accessed using the Controls property.<br />

A container for controls, much like PlaceHolder, but designed for use as a child of<br />

MultiView. You can tell if a given View is being displayed using Visible, or use the<br />

Activate <strong>and</strong> Deactivate events to detect changes in activation state.<br />

continues<br />

www.it-ebooks.info

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

Saved successfully!

Ooh no, something went wrong!