Answers

Question and Answer:

  Home  .Net Mobile

⟩ Explain .NET Mobile SelectionList Control?

The selectionlist control supports drop down lists, check boxes and also radio buttons.

Example: Allow user to select a car

<%@ Page Inherits= "System.Web.UI.MobileControls.MobilePage"%>

<%@ Register TagPrefix="Mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %>

<script runat="server">

private void Car_Click(Object sender, EventArgs e)

{

ActiveForm=f2;

t1.text=cars.Selection.Value;

}

</script>

<Mobile:Form id="f1" runat="server">

<Mobile:SelectionList runat="server" id="cars" >

<Item Text="Camry" Value="$25,000" />

<Item Text="Audi" Value="$32,000" />

<Item Text="BMW" Value="$54,000" />

</Mobile:SelectionList>

<Mobile:Command runat="server" OnClick="Car_Click" Text="Submit" />

</Mobile:Form>

<Mobile:Form id="f2" runat="server">

<Mobile:Label id="t1" runat="server" />

</Mobile:Form>

 166 views

More Questions for you: