ASP.NET Panel Controls
Definition and Usage
Panel control as a container for other controls.
Note: This control is commonly used to programmatically generate controls, or show and hide groups of controls.
Note: This control is rendered as HTML <div> element.
Attributes
属性 | 描述 | .NET |
---|---|---|
BackImageUrl | 规定显示控件背景的图像文件的 URL。 | 1.0 |
DefaultButton | 规定 Panel 中默认按钮的 ID。 | 2.0 |
Direction | 规定 Panel 的内容显示方向。 | 2.0 |
GroupingText | 规定 Panel 中控件组的标题。 | 2.0 |
HorizontalAlign | 规定内容的水平对齐方式。 | 1.0 |
runat | 规定控件是服务器。必须设置为 "server"。 | 1.0 |
ScrollBars | 规定 Panel 中滚动栏的位置和可见性。 | 2.0 |
Wrap | 规定内容是否折行。 | 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 full description, visit the Web Control Standard Attributes .
Control Standard Properties
AppRelativeTemplateSourceDirectory, BindingContainer,
ClientID, Controls, EnableTheming, EnableViewState, ID, NamingContainer,
Page, Parent, Site, TemplateControl, TemplateSourceDirectory, UniqueID,
Visible
For a full description, go to Control Standard Attributes .
Examples
Panel
In this example, we declare a Panel control in an .aspx file, a CheckBox control, and a Button control. When the user selects a CheckBox control and click the Refresh button, Panel controls hidden.
Web server control