Mobile:Label and Mobile:List : List « Mobile « ASP.NET Tutorial






<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" Language="VB" %>
<%@ Register TagPrefix="Mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>

<script runat="server">
   sub StockPick(obj as Object, e as ListCommandEventArgs)
      lblName.Text = "Price for " + e.ListItem.Text
      lblPrice.Text = e.ListItem.Value
      ActiveForm = frmPrice
   end Sub
</script>

<Mobile:Form id="frmMenu" BackColor="#ccddcc" runat="server" >
   <Mobile:Label runat="server" StyleReference="title" 
      Text="Companies"/>
   <Mobile:List runat="server" OnItemCommand="StockPick">
      <Item Text="A" Value="5.0" />
      <Item Text="B" Value="3.5" />
      <Item Text="C" Value="1.4" />
      <Item Text="D" Value="1.3" />
   </Mobile:List> 
</Mobile:Form>

<Mobile:Form id="frmPrice" BackColor="#ccddcc" runat="server" >
    <Mobile:Label id="lblName" runat="server"/>
    <Mobile:Label id="lblPrice" runat="server"/>
</Mobile:Form>








23.5.List
23.5.1.Pick List
23.5.2.Mobile:Label and Mobile:List
23.5.3.Load data from Access database to Mobile:List
23.5.4.Mobile List data binding