ASP.NET Panel Control
Definition and Usage
The Panel control is used as a container for other controls.
Tip:This control is often used to generate controls programmatically, or to display or hide control groups.
Note:
In IE, this control is presented as an HTML <div> element, and in Mozilla it is presented as a <table> tag.
In IE, this control is presented as an HTML <div> element, and in Mozilla it is presented as a <table> tag. | Property | |
---|---|---|
BackImageUrl | Regulate the URL of the image file for displaying the control background. | 1.0 |
DefaultButton | Regulate the ID of the default button in the Panel. | 2.0 |
Direction | Regulate the display direction of the content in the Panel. | 2.0 |
GroupingText | Regulate the title of the control group in the Panel. | 2.0 |
HorizontalAlign | Regulate the horizontal alignment of the content. | 1.0 |
runat | The control is a server. It must be set to "server". | 1.0 |
ScrollBars | Regulate the position and visibility of the scrollbar in the Panel. | 2.0 |
Wrap | The content of the regulation is whether it breaks lines. | 1.0 |
Web Control Standard Properties
AccessKey, Attributes, BackColor, BorderColor, BorderStyle, BorderWidth CssClass, Enabled, Font, EnableTheming, ForeColor, Height, IsEnabled SkinID, Style, TabIndex, ToolTip, Width
For a complete description, please visit Web Control Standard Properties.
Control Standard Properties
AppRelativeTemplateSourceDirectory, BindingContainer, ClientID, Controls EnableTheming, EnableViewState, ID, NamingContainer, Page, Parent, Site TemplateControl, TemplateSourceDirectory, UniqueID, Visible
For a complete description, please visitControl Standard Properties.
Example
- Panel
- In this example, we declare a Panel control, a CheckBox control, and a Button control in the .aspx file. When the user selects the CheckBox control and clicks the refresh button, the Panel control will be hidden.