共用方式為


How to: Add and Configure a List Control 

Use a List control to display a list of items.

To add a List control to an ASP.NET mobile Web Forms page

  1. Drag a List control from the Mobile Web Forms tab of the Toolbox onto a Form or Panel control, or inside a control's template on a mobile Web page. You can also drag it onto a mobile user control page.

  2. In the Properties window, click the ellipsis button (ASP.NET Mobile Designer ellipse) in the Item box.

    The List Properties dialog box is displayed.

  3. Enter the items to appear in the list by doing the following:

    1. Click Create new item.

    2. In the Item Text box, enter the text for that item.

    3. Optionally, in the Value box, enter a value.

To add numbers or bullets to a list

  • In the Properties window, use the drop-down list next to the Decoration property to select numbers or bullets for the list items.

To change an item on a List control

  1. In the Properties window, click the ellipsis button in the Item box.

    The List Properties dialog box is displayed.

  2. Select the item that you want to change.

  3. Press F2 or click the item again to make the item editable.

  4. Enter the new text for that item, and then press ENTER.

See Also

Reference

List

Concepts

Introduction to the List Control
Overriding Properties
Introduction to the ObjectList Control
Using Data Binding with ASP.NET Mobile Controls
Introduction to the Form Control
Introduction to the Panel Control

Other Resources

Using Device Filters
Customizing with Control Templates