Extending Mobile Controls

As with Web controls, much of the power of the mobile controls is in the capability to extend them. Extended or composite controls enable you to minimize the effort needed to reuse code, and make it easy to standardize the layout and handling of common tasks. You can create or extend mobile controls in any of the ways that you did with Web controls.

User Controls

Making a user control is the easiest way to group mobile controls into a reusable object. User controls differ from composite controls in that the control persists as an .ascx file. A composite control is compiled and persists as a .dll file.

User controls are defined identically to mobile pages with the following exceptions:

  • Do not require a page directive ...

Get Special Edition Using® Microsoft® ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.