Latest web development tutorials

ASP.NET Panel ScrollBars property

Control Panel Control Panel

Definition and Usage

ScrollBars property is used to set or return the Panel control scroll bar position and visibility.

grammar

<asp:Panel ScrollBars="value" runat="server">
Some Content
</asp:Panel>
属性 描述
value 规定是否显示滚动条。

可能的值:

  • None - 默认。不显示滚动条。
  • Horizontal - 只显示水平滚动条。
  • Vertical - 只显示垂直滚动条。
  • Both - 显示水平和垂直滚动条。
  • Auto - 如需要,显示水平、垂直滚动条或两者均显示。


Examples

The following examples set the ScrollBars property of a Panel control to "Auto":

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

Some content

</asp:Panel>
</form>

The demonstration >>

Control Panel Control Panel