Latest web development tutorials

ASP.NET Panel HorizontalAlign property

Control Panel Control Panel

Definition and Usage

HorizontalAlign property sets or returns the contents of the Panel control the horizontal alignment.

grammar

<asp:Panel HorizontalAlign="align" runat="server">
Some Content
</asp:Panel>
属性 描述
align 规定内容的水平对齐方式。

可能的值:

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


Examples

The following examples set HorizontalAlign property Panel control:

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

The demonstration >>

Control Panel Control Panel