Udostępnij za pośrednictwem


Panels

A Panel control is an ASP.NET mobile control that can be included within a Form control as a grouping mechanism to organize other controls. Use panels to perform the following:

  • To define style and flow information for a group of controls and visually group a set of controls together. Panels can be used for style inheritance, allowing child controls within a panel to inherit styles from the panel. For more information, see Styles.

  • To show, hide, enable, or disable a set of controls.

  • To create a container for dynamic controls.

  • To provide ASP.NET with information about how to group controls on a screen. When paginating a form, ASP.NET attempts to keep all controls for a single panel on the same screen.

Unlike forms, a panel cannot act as the target of a jump for an application. A panel is not a separate unit of interaction with an application; thus, ASP.NET can combine panels into a single display, to any level of panel depth, as allowed by the target device.

Note

Because the OnInit method constructs the templated UI for the control, any control inheriting from Panel that adds controls to the Controls collection during OnInit must call base.OnInit after the controls are added, not before.

See Also

Concepts

Introduction to the Panel Control

Introduction to the Form Control

Pages

Pagination

Styles

Other Resources

Design and Rendering Concepts for ASP.NET Mobile Controls

Application Developer's Guide