Latest web development tutorials

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控件