Compartilhar via


Comparing Web Controls and Mobile Controls 

ASP.NET Mobile Web pages are based on ASP.NET Web Pages. ASP.NET mobile controls provide a flexible toolset that enables you to create content sites and Web applications intended for a wide variety of mobile devices. You can take advantage of the adaptive rendering of ASP.NET mobile controls, while having the flexibility to customize the display for specific devices or types of devices, such as a handheld computer or a mobile phone.

The following table provides a side-by-side comparison of ASP.NET Web server controls and ASP.NET mobile controls.

Web server control Mobile control Comments or differences

AdRotator

AdRotator

Similar functionality. Mobile control adds ImageKey and NavigateUrlKey properties.

Button, ImageButton, LinkButton

Command

Mobile control combines the functionality of the Web server Button, ImageButton and LinkButton controls.

Calendar

Calendar

Similar functionality. The mobile control does not provide HTML-specific properties directly, but exposes an underlying Web server Calendar control through the WebCalendar property.

[no equivalent control]

PhoneCall

Used to actively drop the data line and initiate the call on dial-capable devices. This is similar to the mailto: protocol for electronic mail addresses, which starts an e-mail client.

CompareValidator

CompareValidator

Same functionality.

CustomValidator

CustomValidator

Same functionality.

DataList, Repeater

List

Similar functionality. Mobile control can apply templates on a per-device basis.

DataGrid

ObjectList

Similar functionality. The ObjectList control provides multiple views to show the data collections

[no equivalent control]

DeviceSpecific

Used to enable property overrides and templates for mobile controls.

[no equivalent control]

Form

Similar to a page in an ASP.NET Web application. Mobile Web pages can contain multiple Form controls.

Image

Image

Similar functionality. The mobile control can select an image from a set of device-specific images.

Label

Label

Same functionality.

HyperLink

Link

ASP.NET cannot render the mobile control as an image. Use the Image control to create an image link (by specifying the NavigateUrl property on the Image control).

Panel

Panel

Mobile panel controls can contain a DeviceSpecific control to display templates of the DeviceSpecific control rather than the panel.

RangeValidator

RangeValidator

Same functionality

RegularExpressionValidator

RegularExpressionValidator

Same functionality.

RequiredFieldValidator

RequiredFieldValidator

Same functionality.

CheckBox, CheckBoxList, DropDownList, ListBox, RadioButton, RadioButtonList

SelectionList

Mobile control combines the functionality of the corresponding ASP.NET Web server controls. Use the SelectType property (and the associated ListSelectType enumeration) to define the type of selection list button to render. For example, setting the SelectionList control's SelectType property to the CheckBox enumeration corresponds to the ASP.NET Web server controls CheckBox and CheckBoxList; DropDown is the same as DropDownList. Use the Rows property to specify the number of items shown in the list when the SelectType property is the ListBox or MultiSelectListBox control.

IStyleSheet

StyleSheet

ASP.NET Web pages use cascading style sheets rather than StyleSheet controls.

Table

[no equivalent control]

Use the List, ObjectList, and SelectionList mobile controls

TextBox

TextBox

Similar functionality. The mobile control does not provide automatic postback, read-only, or multiline functionality.

[no equivalent control]

TextView

Used to display large blocks of text. Supports basic text formatting.

ValidationSummary

ValidationSummary

Same functionality. The mobile control shows validation error messages on a separate form (through the FormToValidate property).

See Also

Concepts

ASP.NET Mobile Controls QuickStart

Other Resources

Getting Started with ASP.NET Mobile Controls