Add MobileListItem to mobile:List : MobileListItem « Mobile « ASP.NET Tutorial






<%@ Page Inherits="System.Web.UI.MobileControls.MobilePage" %>
<%@ Register TagPrefix="mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>
<script runat="server">
    public void Page_Load(Object sender, EventArgs e)
    {
      if (!IsPostBack)
      {
        for (int count=1; count < 100; count++)
        {
          MobileListItem listItem = new MobileListItem(count.ToString());
          List1.Items.Add(listItem);
        }
      }
    }
</script>
<mobile:Form id="Form1" Paginate="true" runat="server">
    <mobile:List id="List1" runat="server"/>
</mobile:Form>








23.6.MobileListItem
23.6.1.Add MobileListItem to mobile:List