Mega Code Archive

 
Categories / ASP.Net Tutorial / Mobile
 

Add MobileListItem to mobile

<%@ 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>