Udostępnij za pośrednictwem


Inside the ASP.NET Mobile Controls

ASP.NET provides controls, components, and tools to help you build mobile Web pages rapidly for many types of devices — without having to write code that is targeted for a specific device. ASP.NET mobile Web pages can recognize a variety of mobile devices and render markup appropriately for them.

You can also create new mobile controls as user controls. Device manufacturers or independent software vendors (ISVs) can add support for new devices. By writing their own control adapters, developers can customize controls to take advantage of unique features on specific devices. For more information about ASP.NET mobile Web user controls and about writing your own control adapters, see Creating Custom Mobile Controls.

Extensibility

ASP.NET mobile Web pages and mobile controls offer the same extensibility features available for ASP.NET pages and server controls, but add support for working with multiple devices. Specifically, ASP.NET mobile Web pages and mobile controls provide the following extensibility:

  • You can use ASP.NET user controls to write simple mobile controls declaratively.

  • You can customize the output of any control for a specific device by adding a new adapter for the control.

  • You can write new mobile controls and use them in ASP.NET mobile Web pages. New controls can use inheritance or composition to take advantage of existing controls.

  • You can add support for an entirely new device by using adapter extensibility, with no changes to individual applications.

ASP.NET Mobile Controls

You can create ASP.NET mobile Web pages in Visual Studio or with any text editor. Many of the controls are similar to ASP.NET Web server controls. For example, the System.Web.UI.MobileControls.Label and System.Web.UI.MobileControls.TextBox controls mimic the behavior of the ASP.NET System.Web.UI.WebControls.Label and System.Web.UI.WebControls.TextBox controls.

The following mobile controls are available in ASP.NET:

AdRotator

Calendar

Command

CompareValidator

CustomValidator

Form

Image

Label

Link

List

MobilePage

ObjectList

Panel

PhoneCall

RangeValidator

RegularExpressionValidator

RequiredFieldValidator

SelectionList

StyleSheet

TextBox

TextView

ValidationSummary

See Also

Other Resources

Creating ASP.NET Mobile Web Pages