当前位置: 首页 > 网络学院 > 服务端脚本教程 > .NET Mobile > .NET Mobile Lists

.NET Mobile
.NET Mobile Introduction
.NET Mobile Example
.NET Mobile Emulators
.NET Mobile Forms
.NET Mobile Events
.NET Mobile Input
.NET Mobile Input Validation
.NET Mobile Lists
.NET Mobile Selections
.NET Mobile Images
.NET Mobile Utilities
ASP.NET Mobile Controls Reference

.NET Mobile Lists


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-07-31   浏览: 720 ::
收藏到网摘: n/a

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





评论 (1) 1 All

登陆 | 还没注册?