ASP.NET Calendar CaptionAlign 屬性


Calendar 控件 Calendar 控件

定義和用法

CaptionAlign 屬性用於設置或返回日曆的標題文本的對齊方式。

語法

<asp:Calendar Caption="text" CaptionAlign="align" runat="server" />

屬性 描述
align 規定標題文本的對齊方式。

可能的值:

  • Top - 標題顯示在日曆頂部。文本居中。
  • Bottom - 標題顯示在日曆底部。文本居中。
  • Left - 標題顯示在日曆頂部。文本向左對齊。
  • Right - 標題顯示在日曆頂部。文本向右對齊。


實例

下麵的實例設置了日曆中的 Caption 屬性,把標題排列到日曆的底部:

<form runat="server">
<asp:Calendar id="cal1" runat="server"
Caption="This is a Caption text"
CaptionAlign="bottom" />
</form>


Calendar 控件 Calendar 控件