Add items to mobile List in code (VB.net) : List « Mobile Control « ASP.Net






Add items to mobile List in code (VB.net)

<%@ Page 
    Inherits="System.Web.UI.MobileControls.MobilePage" 
    Language="VB" 
%>
<%@ Register 
    TagPrefix="mobile" 
    Namespace="System.Web.UI.MobileControls" 
    Assembly="System.Web.Mobile" 
%>
<script runat="server" language="VB">
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
    Dim MyItem1 as New MobileListItem
    Dim MyItem2 as New MobileListItem
    Dim MyItem3 as New MobileListItem
    MyItem1.Text = "A"
    MyItem2.Text = "B"
    MyItem3.Text = "C"
    List1.Items.Add(MyItem1)
    List1.Items.Add(MyItem2)
    List1.Items.Add(MyItem3)
End Sub
</script>
<mobile:form 
    id="StartForm" 
    runat="server">
<mobile:list
    runat="server" 
    id="List1"
/>
</mobile:form>
           
       








Related examples in the same category

1.Remove value from mobile list (VB.net)
2.Add hyperlink item to mobile list (VB.net)
3.Assign values to mobile list (VB.net)
4.mobile list decoration: bulleted (VB.net)