Introduction to the Form Control
Most pages on the World Wide Web are too complex to be displayed on current mobile devices, such as Web phones. Themobile control enables you to break up complex pages into a collection of forms on a mobile Web page. With this ability, you can minimize the effort required to port Web-based applications to mobile devices. For more information, see .
Form Controls in Mobile Web Pages
ASP.NET mobile Web pages can contain more than one Form control. However, when they are displayed on a mobile device, mobile Web applications display only one Form control at a time. When a user browses to a mobile Web page, the first form on that page appears by default. You can set the page'sproperty to specify the current active form. You can also provide the user with links between forms on the same page.
Form controls contain content and other controls. You can think of a Form control as a page within a page. All Form controls on a page share the same code and page-state information. Using multiple forms on a mobile Web page helps reduce the number of physical page files in your application, and thus improves performance at run time.
A mobile Web page must contain at least one Form control. All other controls, with the exception of the StyleSheet control, must be placed within a Form control, a Panel control, or a control template.
You can set the Form control's color with theand properties. You can also type literal text directly in a Form control, which will flow around other controls that you add. Format the text using the and properties, which are in the property.
Mobile device displays differ widely in their capabilities. To customize the presentation of content and controls for particular mobile devices, you can use a device filters to forms. These enable the use of property override values and control templates.control to apply
Your application can handle Form control events to customize the behavior of the Form control. A form raises anevent when it becomes the current form. The event occurs when it is no longer the active form.
On some mobile devices, if a form's content is long, it can be paginated. Each screen in the paginated form has a current page number. Page numbers begin with 1. The Form control keeps the current page number in itsproperty. When the Form control paginates its content, it also displays user interface elements that enable the user to navigate between the pages. You can set the style of the pagination user interface elements using the Form control's property.