<%@ Import Namespace="System.Drawing" %>
<!DOCTYPE html>
<html>
<head>
<script runat="server">
Sub ChangeDayStyle(obj As Object, e As EventArgs)
cal1.DayStyle.ForeColor = Color.FromName("Blue")
End Sub
</script>
</head>
<body>
<form runat="server">
<asp:Calendar id="cal1" runat="server">
<DayStyle ForeColor="#FF0000" />
</asp:Calendar>
<asp:Button id="button1" runat="server" OnClick="ChangeDayStyle"
Text="Change Day Style" />
</form>
</body>
</html>