| HTML Tutorials |
|
|
| XML Tutorials |
|
|
| Browser Scripting |
|
|
| Server Scripting |
|
|
| .NET (dotnet) |
|
|
| Multimedia |
|
|
| Web Building |
|
|
| Java Tutorials |
|
|
| Programming Langauges |
|
|
| Soft Skills |
|
|
|
|
There are different input and display properties of the mobile List Control supports .
|
|
Introduction to the List Control
|
|
A static list of items will be displayed on the List control. Use an SelectionList control to enable users to select an item. Use an ObjectList control to view information from a database in tabular format. A List control must be placed within the Form or Panel control, or inside the control's template on a mobile Web page. You can also drag it onto a mobile user control page.
Add items to a list by clicking the ellipsis button in the Items box in the Properties window, and then using the List Properties dialog box. The number of items that the list contains can be observed by settin the ItemCount property. The list will be paginated on some devices. Set the ItemsPerPage property to the preferred number of list items to be displayed on each page.
The List control can populate its items and set property values dynamically based on values in a data source, using data binding. To bind the control to data, set the DataSource property to an object that implements the IEnumerable interface, and set the DataMember property to the data source's member (such as a dataset table) to read from when the control performs data binding. The DataTextField and DataValueField properties bind data to the Text and Value properties, respectively.
Set the appearance of the List control with the Alignment, ForeColor, Font, StyleReference, and Wrapping properties. To prevent a line break after a List control, set its BreakAfter property to false.
|
|
How to: Add and Configure a List Control
|
|
To add a List control to an ASP.NET mobile Web Forms page
- Drag a List control from the Mobile Web Forms tab of
the Toolbox onto a Form or Panel control, or inside a control's
template on a mobile Web page. You can also drag it onto a mobile
user control page.
- In the Properties window, click the ellipsis button
in the Item box.
List Properties dialog box is displayed.
- Enter the item to appear in the list by doing the following steps:
- First click Create new item.
- Second in the Item Text box, enter the text for that item.
- Finally in the Value box, enter a value. This is optional
|
|
Selecting from a List
|
<%@ Page
Inherits=
"System.Web.UI.MobileControls.MobilePage"%>
<%@ Register
TagPrefix="Mobile"
Namespace="System.Web.UI.MobileControls"
Assembly="System.Web.Mobile" %>
<script runat="server">
Sub Show_Price(sender As Object,e As ListCommandEventArgs)
text1.Text=e.ListItem.Text & "=" & e.ListItem.Value
ActiveForm=f2
End Sub
</script>
<Mobile:Form id="f1" runat="server">
<Mobile:List runat="server"
OnItemCommand="Show_Price">
<Item text="Sumsung" value="$30,000" />
<Item text="LG" value="$32,000" />
<Item text="BPL" value="$34,000" />
</Mobile:List>
</Mobile:Form>
<Mobile:Form id="f2" runat="server">
<Mobile:Label runat="server" id="text1" />
</Mobile:Form>
|
|
Form 1: Displays the list of televisions
Form 2: This page displays a price.
|
|
Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
Keywords:
.NET Mobile Lists,mobile ring tones,cell phone mobile,pay as you go mobile,mobile phone deals,internet phone directory,database lists,mobile tones,ringtones mobile,sms mobile,samsung mobile,mobile phones,gsm mobile,3g mobile,siemens mobile,lg mobile,mobile deals,sim mobile,sonyericsson mobile,mobile ericsson,mobile phone,t610 mobile,uk mobile,mobile ringtone,mobile prices,mobile camera,gprs mobile,mobile wireless,mobile handsets,k700i mobile,mobile handset,bluetooth mobile
|
|
| HTML Quizes |
|
|
| XML Quizes |
|
|
| Browser Scripting Quizes |
|
|
| Server Scripting Quizes |
|
|
| .NET (dotnet) Quizes |
|
|
| Multimedia Quizes |
|
|
| Web Building Quizes |
|
|
| Java Quizes |
|
|
| Programming Langauges Quizes |
|
|
| Soft Skills Quizes |
|
|
|