ASP.NET Panel HorizontalAlignProperties


Panel 控件Panel Control

Definition and Usage

The HorizontalAlign property is used to set or return the horizontal alignment of the content in the Panel control.

Syntax

<asp:Panel HorizontalAlign="align" runat="server">
Some Content
</asp:Panel>
 
Property Description
align Specifies the horizontal alignment of the content.

Possible values:

  • Center
  • Justify
  • Left
  • NotSet (Default)
  • Right


Example

The following example sets the HorizontalAlign property of the Panel control:

<form runat="server">
<asp:Panel id="pan1" runat="server" HorizontalAlign="Right" >
Hello!
</asp:Panel>
</form>

Try it Yourself »

Panel 控件Panel Control Other Extensions