Partager via


ASP.NET Mobile Web Pages

The Microsoft Visual Studio integrated development environment (IDE) enables you to easily build ASP.NET applications that include mobile Web pages. You can include mobile Web pages in any ASP.NET Web site alongside ASP.NET Web pages. In Visual Studio, you can work with the adaptive rendering, customization, and extensibility features of ASP.NET mobile controls, using the standard IDE design tools: the page designer, the Toolbox, the debugger, Source view, Design view, and more.

To start creating an ASP.NET mobile Web page, open an existing ASP.NET Web site project in Visual Studio 2005, or create a new Web site project. Create a new mobile Web page (Web Form) and drag a mobile control from the Mobile Web Forms tab in the Toolbox. You can specify properties and event handlers for the control using the Properties window. Use standard Visual Studio functionality to build and test your application.

Because ASP.NET automatically adapts the rendering of your mobile page to different devices, you build your application by logically grouping controls and arranging them to match the desired user experience. A difference from designing ASP.NET pages for desktop browsers is that you cannot resize mobile controls manually. Instead, ASP.NET resizes controls when it generates the appropriate markup. To see how the application renders on a specific device, view it on an emulator for the device or on the actual device. For more information, see How to: Work with Emulators and Browsers.

Design view displays a representation of pages. It does not emulate the rendering of any specific device. As you develop your pages, Design view provides you with visual cues that indicate the current property settings of mobile controls. However, the page might not appear at run time exactly as you see it in Design view. The target device might not support every control property that you have set, or it might support the property, but not the setting you specify. In addition, some properties are provided strictly for extensibility. For example, most of the controls have a BackColor property, but only the Form control currently uses it. The mobile controls enable you to develop controls that use the BackColor property. Developers writing custom device adapters can use this property while rendering controls.

You can optimize the markup generated by a mobile control for a specific device. Mobile controls provide powerful tools that enable you to customize the application's output for specific devices by overriding property values and by creating a specialized rendering based on device capabilities.

The extensibility model of mobile controls enables new device support to be added without requiring that the Web application be modified. You can add support for new devices by updating configuration file settings or by deploying new device adapters. This greatly increases the lifespan of your applications because they continue to work with the latest devices.

In This Section