ASP.NET Calendar CaptionAlign 属性
ASP.NET 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>