asp.net 2.0 Mobile Development list control

Source: Internet
Author: User

Overview

In many cases, we use the list control to make it easier for the user to select some options. For example, when registering a new user on a website, you usually ask if your gender is "male" or "female", then we use a single button for the user to make the appropriate choice. And when you fill out your home address, you typically use a drop-down list of provincial names to allow users to choose directly, which reduces the amount of user input. These individual buttons and Drop-down lists are all in the form of a list control in the ASP.net mobile program. We can use list controls to render lists of various forms (single, multiple, Drop-down lists) for the user to select and use. However, in the ASP.net 2.0 Mobile Development toolkit, there are only three list controls, respectively SelectionList, list, and ObjectList controls. Although there are not many types of list controls in ASP.net 2.0, we can use the three list controls of SelectionList, list, and ObjectList to implement almost all of the functions of single, multiple, and so on. In this series, we will explore some of the basic features and usage of these three controls, and explain the similarities and differences between the three controls.

Figure 1 is the relationship of the SelectionList, list, and ObjectList three controls over the inheritance of the class:

Figure 1

SelectionList is the simplest of the three list controls above, but it can be rendered in a variety of different types, so it has great flexibility to use the applied list type for different requirements. Also because the SelectionList control does not support paging, the control appears to be powerless in cases where multiple list items are included. It is also important to note that SelectionList is the only one of these three list controls that supports multiple selections. The control can also be rendered in the form of a drop-down list or as a single and multiple-selection box, which, of course, must be accepted by browsers on the mobile device. In some WML browsers, only special rendering forms are supported, such as single and multiple-selection buttons, and the Drop-down list is not supported for rendering. Figure 2 illustrates the difference between rendering a drop-down list on different browsers.

Figure 2 on the Pocketie browser shown in the previous illustration, the list control is rendered in the form of a drop-down list. In a Openwave WML browser, the rendering form of a drop-down list type is not supported, in which case the individual list items in the list are displayed for the user to select accordingly. The list control supports paging functionality, which means it supports lists with more list items. It can only be rendered as a bulleted or numbered list (as long as the browser supports it). In addition, other list forms that are supported by SelectionList (such as a drop-down list) cannot be implemented in the list. The list control in Figure 3 is rendered as a numbered list and supports paging functionality.

Figure 3 The list control appears as a numbered list on the page, and it supports paging functionality.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.