ASP.NET Tutoria...login
ASP.NET Tutorial
author:php.cn  update time:2022-04-11 14:18:18

Panel control


ASP.NET Panel Control


up.gifWeb 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

PropertiesDescription.NET
BackImageUrlSpecifies the URL of the image file that displays the background of the control. 1.0
DefaultButtonSpecifies the ID of the default button in the Panel. 2.0
DirectionSpecifies the direction of the content display of Panel. 2.0
GroupingTextSpecifies the title of the control group in Panel. 2.0
HorizontalAlignSpecifies the horizontal alignment of the content. 1.0
runat Specifies that the control is a server. Must be set to "server". 1.0
ScrollBarsSpecifies 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.


up.gif Web Server Control

php.cn