ASP.NET Calendar CaptionAlignProperty


Calendar 控件Calendar Control

Definition and Usage

The CaptionAlign property is used to set or return the alignment of the caption text of the calendar.

Syntax

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

Property Description
align Specifies the alignment of the caption text.

Possible values:

  • Top - The caption is displayed at the top of the calendar. The text is centered.
  • Bottom - The caption is displayed at the bottom of the calendar. The text is centered.
  • Left - The caption is displayed at the top of the calendar. The text is aligned to the left.
  • Right - The caption is displayed at the top of the calendar. The text is aligned to the right.


Example

The following example sets the Caption property of the calendar and aligns the caption to the bottom of the calendar:

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

Demo Example »

Calendar 控件Calendar Control Other Extensions