ASP.NET Panel ScrollBarsProperties


Panel 控件Panel Control

Definition and Usage

The ScrollBars property is used to set or return the position and visibility of scrollbars in a Panel control.

Syntax

<asp:Panel ScrollBars="value" runat="server">
Some Content
</asp:Panel>
 
Property Description
value Specifies whether scrollbars are displayed.

Possible values:

  • None - Default. No scrollbars are displayed.
  • Horizontal - Displays only a horizontal scrollbar.
  • Vertical - Displays only a vertical scrollbar.
  • Both - Displays both horizontal and vertical scrollbars.
  • Auto - Displays horizontal, vertical, or both scrollbars as needed.


Example

The following example sets the ScrollBars property of the Panel control to "Auto":

<form runat="server">
<asp:Panel id="pan1" runat="server"
Height="100px" ScrollBars="Auto">

Some content

</asp:Panel>
</form>

Demo Example »

Panel 控件Panel Control Other Extensions