Calendar Web 控件的常用属性说明如下表所示:
下列范例显示一个简单的Calendar Web 控件:
<Html>
<Form runat="Server">
<asp:Calendar id="Calendar1" runat="server"
SelectedDate="2001/04/28"
SelectionMode="DayWeekMonth"
SelectMonthText="全选"
ShowGridLines="True"
ShowNextPrevMonth="True"
NextMonthText="[<b>Next</b>]"
TitleFormat="MonthYear"
SelectedDayStyle-BackColor="#DBDBDB"
SelectedDayStyle-ForeColor="Red"
SelectedDayStyle-Font-Bold="True"
SelectedDayStyle-Font-Name="Arial"/>
</Form>
</Html>