Panel control
ASP.NET Panel Control
Web server control
Definition and usage
Panel control Serves as a container for other controls.
Tips: This control is often used to programmatically generate controls, or to show and hide control groups.
Notes: This control is rendered as an HTML <div> element.
Properties
Properties | Description | .NET |
---|---|---|
BackImageUrl | Specifies the URL of the image file that displays the background of the control. | 1.0 |
DefaultButton | Specifies the ID of the default button in the Panel. | 2.0 |
Direction | Specifies the direction of the content display of Panel. | 2.0 |
GroupingText | Specifies the title of the control group in Panel. | 2.0 |
HorizontalAlign | Specifies the horizontal alignment of the content. | 1.0 |
runat | Specifies that the control is a server. Must be set to "server". | 1.0 |
ScrollBars | Specifies the position and visibility of the scroll bar in the Panel. | 2.0 |
Wrap | Specifies whether the content should be wrapped. | 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, 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, visit Control 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 is hidden.
Web Server Control