Share via


ListSelectType Enumeration

Specifies how the selection list UI will be presented. This class cannot be inherited.

public sealed enum System.Web.UI.MobileControls.ListSelectType : 
   System.Enum

Remarks

The ListSelectType enumeration represents how a selection list will be rendered in a container, as a drop-down box, list box, set of options (radio buttons), and so on. In ASP.NET, you specify the value of the SelectType property as one of the ListSelectType enumeration values. The following code fragment shows a selection list displayed as check boxes with multiple selections.

<mobile:SelectionList
   runat="server"
   ListSelectType="CheckBox"
   <Item Value="Fruit" Text="Apple" Selected="True"></Item>
   <Item Value="Vegetable" Text="Carrot"></Item>
   <Item Value="Juice" Text="Orange" Selected="True"></Item>
</mobile:SelectionList>

Members

Member name Description
DropDown Renders list items in a drop-down list box.
ListBox Renders list items in a list box.
Radio Renders list items as options.
MultipleSelectionListBox Renders list items in a list box with multiple selection capability.
CheckBox Render list items with check boxes and multiple selection capability.

Example

This example displays a list of check boxes.

[C#]

private void Form1_Activate(object sender, System.EventArgs e)
{
   Label1.Text = "Choose one or more items:";
   SelectionList1.SelectType = ListSelectType.CheckBox;
   SelectionList1.Items.Add("Fruit");
   SelectionList1.Items.Add("Vegetables");
   SelectionList1.Items.Add("Juice");
}

Requirements

Namespace: System.Web.UI.MobileControls

   Assembly: System.Web.Mobile

See Also

System.Web.UI.MobileControls Namespace