System.Web
1.0.5000.0
2.0.0.0
Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.
System.Web.UI.WebControls.WebControl
System.Web.UI.ToolboxData("<{0}:Panel runat=server>Panel</{0}:Panel>")
System.Web.UI.PersistChildren(true)
System.Web.UI.ParseChildren(false)
System.ComponentModel.Designer("System.Web.UI.Design.WebControls.PanelDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")
In this topic:
-
Introduction
-
Declarative Syntax
Introduction
The control is a container for other controls. It is especially useful when you want to generate controls programmatically, hide/show a group of controls, or localize a group of controls.
The property is useful for localizing a control's content to display text for languages that are written from right to left, such as Arabic or Hebrew.
The control provides several properties that allow you to customize the behavior and display of its contents. Use the property to display a custom image for the control. Use the property to specify scroll bars for the control.
Declarative Syntax
<asp:Panel
AccessKey="string"
BackColor="color name|#dddddd"
BackImageUrl="uri"
BorderColor="color name|#dddddd"
BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|
Inset|Outset"
BorderWidth="size"
CssClass="string"
DefaultButton="string"
Direction="NotSet|LeftToRight|RightToLeft"
Enabled="True|False"
EnableTheming="True|False"
EnableViewState="True|False"
Font-Bold="True|False"
Font-Italic="True|False"
Font-Names="string"
Font-Overline="True|False"
Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|
Large|X-Large|XX-Large"
Font-Strikeout="True|False"
Font-Underline="True|False"
ForeColor="color name|#dddddd"
GroupingText="string"
Height="size"
HorizontalAlign="NotSet|Left|Center|Right|Justify"
ID="string"
OnDataBinding="DataBinding event handler"
OnDisposed="Disposed event handler"
OnInit="Init event handler"
OnLoad="Load event handler"
OnPreRender="PreRender event handler"
OnUnload="Unload event handler"
runat="server"
ScrollBars="None|Horizontal|Vertical|Both|Auto"
SkinID="string"
Style="string"
TabIndex="integer"
ToolTip="string"
Visible="True|False"
Width="size"
Wrap="True|False"
/>
Represents a control that acts as a container for other controls.
Constructor
To be added
Initializes a new instance of the class.
1.0.5000.0
2.0.0.0
Method
System.Void
a
The method is used primarily by control developers.
Adds information about the background image, alignment, wrap, and direction to the list of attributes to render.
1.0.5000.0
2.0.0.0
Property
System.String
To be added: an object of type 'string'
Use this property to display a custom image for the control.
If the image is smaller than the , it will be tiled to fill in the .
This property is supported only on browsers that support HTML 4.0 or later.
Gets or sets the URL of the background image for the panel control.
1.0.5000.0
2.0.0.0
System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))
System.ComponentModel.DefaultValue("")
System.ComponentModel.Bindable(true)
Method
2.0.0.0
System.Web.UI.WebControls.Style
The method is used primarily by control developers.
Creates a style object that is used internally by the control to implement all style related properties.
A that contains the style properties of the control.
Property
2.0.0.0
System.Web.UI.Themeable(false)
System.String
To be added.
Use the property to indicate which button gets clicked when the control has focus and the user presses the ENTER key. The can be set to the identifier for a control or any control that implements the interface except a control.
If the is set to a control that does not implement the interface, or to a control that is not contained in the control, the control throws an exception while rendering.
Setting the property is not supported for the following scenarios:
-
Setting focus outside of the input controls in the panel and then pressing the ENTER key. The default post back action is not guaranteed to trigger.
-
Pressing the ENTER key with focus inside a multi-line textbox. In a multi-line textbox, pressing the ENTER key should create a new line in the textbox which is the expected behavior. In browsers where the pressing the ENTER key inside a multi-line textbox triggers a post back but you want the ENTER key to create a new line instead you can attach a JavaScript function to the input control. The script should capture the ENTER key and stop the post back. For example, you can use the property collection to add client script for the onKeyPress event.
-
Referencing a default button that is a control. Only and controls are supported.
-
Changing the programmatically during an asynchronous post back when the control is not inside of an control. Asynchronous post backs can be enabled on a page by adding one or more controls to the page. controls can be used to update selected regions of a page instead of updating the whole page with a postback. For more information, see UpdatePanel Control Overview and Partial-Page Rendering Overview.
-
Setting this property by themes or style sheet themes. For more information, see and ASP.NET Themes Overview.
Gets or sets the identifier for the default button that is contained in the control.
Property
2.0.0.0
System.Web.UI.WebControls.ContentDirection
To be added.
Use the property to specify the display direction for controls that include text in a control. This property is set using one of the enumeration values. The following table lists the possible values.
-
Value
Description
-
NotSet
The content direction is not set.
-
LeftToRight
The content direction is left to right.
-
RightToLeft
The content direction is right to left.
If you specify LeftToRight, child controls that include text display from left to right. If you specify RightToLeft, child controls that include text display right to left. Use RightToLeft to display text for languages that are written from right to left, such as Arabic or Hebrew.
This property is supported only on browsers that support HTML 4.0 or later.
Gets or sets the direction in which to display controls that include text in a control.
Property
2.0.0.0
System.ComponentModel.Localizable(true)
System.String
To be added.
Use the property to display a frame and caption for the group of controls that is contained in the control.
The value of a control is rendered using the FIELDSET and LEGEND elements, which were introduced in the HTML 4.0 specification. If the client browser uses HTML 3.2, the value is not rendered. Refer to your client browser documentation for details on how the FIELDSET and LEGEND elements are displayed.
The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see and ASP.NET Globalization and Localization.
Gets or sets the caption for the group of controls that is contained in the panel control.
Property
System.Web.UI.WebControls.HorizontalAlign
To be added: an object of type 'HorizontalAlign'
Use this property to specify the alignment of the elements in the .
Gets or sets the horizontal alignment of the contents within the panel.
1.0.5000.0
2.0.0.0
System.ComponentModel.DefaultValue(System.Web.UI.WebControls.HorizontalAlign.NotSet)
System.ComponentModel.Bindable(true)
Method
2.0.0.0
System.Void
The method is used primarily by control developers.
Renders the HTML opening tag of the control to the specified writer.
An that represents the output stream to render HTML content on the client.
Method
2.0.0.0
System.Void
The method is used primarily by control developers.
Renders the HTML closing tag of the control into the specified writer.
An that represents the output stream to render HTML content on the client.
Property
2.0.0.0
System.Web.UI.WebControls.ScrollBars
To be added.
Use the property to specify the visibility and position of scroll bars in a control. This property is set using one of the enumeration values. The following table lists the possible values.
-
Value
Description
-
None
No scroll bars are shown.
-
Horizontal
Only a horizontal scroll bar is shown.
-
Vertical
Only a vertical scroll bar is shown.
-
Both
Both horizontal and vertical scroll bars are shown.
-
Auto
If necessary, horizontal, vertical, or both scroll bars are shown. Otherwise, no scroll bars are shown.
If you specify Auto for the property, scroll bars are automatically shown when the size of the content in a control exceeds the size of the control itself. For example, if a control contains a table, and the panel is not wide enough to display all the rows in the table, a vertical scroll bar is shown. If the size of the table exceeds the height and width of the panel, both vertical and horizontal scroll bars are shown.
This property is supported only on browsers that support HTML 4.0 or later.
Gets or sets the visibility and position of scroll bars in a control.
Property
System.Boolean
To be added: an object of type 'bool'
Use this property to wrap the contents of the .
Gets or sets a value indicating whether the content wraps within the panel.
1.0.5000.0
2.0.0.0
System.ComponentModel.DefaultValue(true)
System.ComponentModel.Bindable(true)