⟩ What is .NET Mobile Lists. Explain with an example?
There are 2 types of lists:
The selectionlist control supports drop down lists, check boxes and also radio buttons.
The list control supports selection from a list or menu. It has a display and a value property.
Example: Display price of a car selected by user.
<script runat="server">
private void Show_Price(Object sender, ListCommandEventArgs e)
{
text1.Text=e.ListItem.Text + "=" + e.ListItem.Value;
ActiveForm=f2;
}
</script>
<Mobile:Form id="f1" runat="server">
<Mobile:List runat="server" OnItemCommand="Show_PriceList">
<Item text="Camry" value="$25,000" />
<Item text="Audi" value="$32,000" />
<Item text="BMW" value="$54,000" />
</Mobile:List>
</Mobile:Form>
<Mobile:Form id="f2" runat="server">
<Mobile:Label runat="server" id="text1" />
</Mobile:Form>