<%@ Page Language="VB" AutoEventWireup="True" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<head>
<title>Calendar Example</title>
<script language="VB" runat="server">
Sub Selection_Change(sender As Object, e As EventArgs)
Calendar1.TodaysDate = Calendar1.SelectedDate
Label1.Text = "Today's Date is now " & Calendar1.TodaysDate.ToShortDateString()
End Sub 'Selection_Change
</script>
</head>
<body>
<form id="form1" runat="server">
<h3>Calendar Example</h3>
Select a date on the Calendar control to use as today's date.<br /><br />
<asp:Calendar ID="Calendar1" runat="server"
SelectionMode="Day"
ShowGridLines="True"
OnSelectionChanged="Selection_Change">
<SelectedDayStyle BackColor="Yellow"
ForeColor="Red">
</SelectedDayStyle>
</asp:Calendar>
<hr /><br />
<asp:Label id="Label1" runat="server" />
</form>
</body>
</html>