<%@ Page Language=VB Debug=true %>
<%@ Import Namespace="System.Data" %>
<script runat=server>
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
MyCal.SelectedDate = Today()
End Sub
Sub calSelectChange(ByVal Sender as Object, ByVal E as EventArgs)
Dim i as Integer
lblMessage.Text = "You selected:"
For i = 0 to MyCal.SelectedDates.Count - 1
lblMessage.Text = lblMessage.Text & "<BR>" _
& MyCal.SelectedDates(i).ToShortDateString()
Next
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Calendar 3 Control Sample Page</TITLE>
</HEAD>
<BODY >
<form runat="server">
<Font Face="Tahoma">
<asp:Calendar
id="Mycal"
runat="server"
CellPadding="3"
CellSpacing="3"
DayNameFormat="Short"
FirstDayOfWeek="Default"
NextPrevFormat="FullMonth"
SelectionMode="DayWeekMonth"
ShowDayHeader="True"
ShowGridLines="False"
ShowNextPrevMonth="True"
ShowTitle="True"
TitleFormat="MonthYear"
Font-Name="Tahoma"
Font-Size="12"
BackColor="ivory"
TodayDayStyle-Font-Bold="True"
DayHeaderStyle-Font-Bold="True"
OtherMonthDayStyle-ForeColor="gray"
TitleStyle-BackColor="#3366ff"
TitleStyle-ForeColor="white"
TitleStyle-Font-Bold="True"
SelectedDayStyle-BackColor="#ffcc66"
SelectedDayStyle-Font-Bold="True"
WeekendDayStyle-Font-Italic="True"
NextPrevStyle-Font-Italic="True"
SelectorStyle-Font-Bold="True"
SelectorStyle-BackColor="#3366ff"
OnSelectionChanged="calSelectChange"
/>
<BR><BR>
<asp:Label
id="lblMessage"
runat="server"
Font-Bold="True"
/>
</Font>
</Form>
</BODY>
</HTML>
|