Calendar.CaptionAlign Property
Gets or sets the alignment of the text that is rendered as a caption for the calendar.
Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
abstract CaptionAlign : TableCaptionAlign with get, set override CaptionAlign : TableCaptionAlign with get, set
<asp:Calendar CaptionAlign="TableCaptionAlign" />
Property Value
Type: System.Web.UI.WebControls.TableCaptionAlignA TableCaptionAlign value that indicates the alignment of the caption.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The value specified is not one of the TableCaptionAlign values. |
This property determines where the caption appears in relation to the Calendar control. The default value is NotSet, which lets the browser determine where to align the caption. The following table explains the relationship between the TableCaptionAlign value and the appearance of the caption.
TableCaptionAlign value | Appearance |
|---|---|
Bottom | The caption appears at the bottom of the calendar, with the text centered. |
Left | The caption appears at the top of the calendar, with the text left-aligned. |
NotSet | The caption alignment is not set and is determined by the browser. |
Right | The caption appears at the top of the calendar, with the text right-aligned. |
Top | The caption appears at the top of the calendar with the text centered. |
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.