W3Schools

home HOME

ASP.NET Tutorial
.NET HOME
.NET Intro
.NET vs ASP
.NET Install
.NET Pages
.NET Controls
.NET Events

ASP.NET Forms
.NET Forms
.NET ViewState
asp:TextBox
asp:Button

ASP.NET Binding
Data Binding
ArrayList
Hashtable
SortedList
XML Files
asp:Repeater
asp:DataList

ASP.NET Database
.NET DB Connection

ASP.NET 2.0
2.0 New Features
2.0 Master Pages
2.0 Navigation

References
HTML Controls
Web Controls
Validation Controls

Examples
ASP.NET Examples

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

W3Schools Forum

Helping W3Schools

ASP.NET CaptionAlign Property


Calendar Control Reference Complete Calendar Control Reference

Definition and Usage

The CaptionAlign property is used to get or set the alignment of the caption text for a calendar.

Syntax

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

Attribute Description
align Specifies the alignment of the caption text

Possible Values:

  • Top - Caption is displayed at the top of the calendar. Text is centered
  • Bottom - Caption is displayed at the bottom of the calendar. Text is centered
  • Left - Caption is displayed at the top of the calendar. Text is left-aligned
  • Right - Caption is displayed at the top of the calendar. Text is right-aligned


Example

The following example sets the Caption property in a calendar and aligns it to the bottom of the calendar:

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

Try-It-Yourself Demos

Set the Caption property of a Calendar control


Calendar Control Reference Complete Calendar Control Reference


Learn XML with Stylus Studio XML Editor – Free Download

Stylus Studio provides tools for editing and debugging XML, XSLT, XML Schema, DTD, XQuery, Web Services,and more!

Using Stylus Studio XML Tools You Can:

See why millions use Stylus Studio as their preferred XML tool. Download a FREE TRIAL or watch an online VIDEO DEMO today!



Jump to: Top of Page or HOME or Printer Friendly Printer friendly page

W3Schools provides material for training only. We do not warrant the correctness of its contents. The risk from using it lies entirely with the user. While using this site, you agree to have read and accepted our terms of use and privacy policy.

Copyright 1999-2008 by Refsnes Data. All Rights Reserved.

Validate Validate W3C-WAI level A conformance icon W3Schools was converted to XHTML in December 1999