From http://www.w3schools.com (Copyright Refsnes Data)

.NET Mobile Lists

previous next

The Mobile List Control supports different input and display properties.


Selecting from a List

This page has two forms:

<%@ Page
Inherits=
"System.Web.UI.MobileControls.MobilePage"%>
<%@ Register
TagPrefix="Mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<script runat="server">
Sub Show_Price(sender As Object,e As ListCommandEventArgs) 
  text1.Text=e.ListItem.Text & "=" & e.ListItem.Value
  ActiveForm=f2
End Sub

</script>

<Mobile:Form id="f1" runat="server">
<Mobile:List runat="server"
OnItemCommand="Show_Price">
<Item text="Volvo" value="$30,000" />
<Item text="BMW" value="$32,000" />
<Item text="Audi" value="$34,000" />
</Mobile:List>
</Mobile:Form>

<Mobile:Form id="f2" runat="server">
<Mobile:Label runat="server" id="text1" />
</Mobile:Form>

The first form has a list of cars.

The second page displays a price. This page is activated when a car is selected on the first page.

When the application runs on a mobile device the two pages will display like this:

Form 1

Volvo
BMW
Audi


Form 2

Volvo=$30,000








previous next

From http://www.w3schools.com (Copyright Refsnes Data)