<%@ Page Language="C#" %>
<HTML>
<body>
<script runat="server">
void PrettyCalendar_OnDayRender (object Sender, System.Web.UI.WebControls.DayRenderEventArgs e)
{
if (e.Day.Date == System.DateTime.Today)
{
e.Cell.Controls.Add(new LiteralControl("<br />"));
e.Cell.Controls.Add(new LiteralControl("Today!"));
}
}
</script>
<form runat="server" ID="Form1">
<asp:Calendar ID="PrettyCalendar"
Runat="server"
OnDayRender="PrettyCalendar_OnDayRender">
<TodayDayStyle ForeColor="Red" BackColor="Aqua"></TodayDayStyle>
<DayStyle Font-Bold="True"
HorizontalAlign="Left"
Height="90px"
BorderWidth="1px"
BorderStyle="Solid"
BorderColor="Red"
Width="100px"
VerticalAlign="Top"
BackColor="Yellow"></DayStyle>
<NextPrevStyle ForeColor="Blue"/>
<DayHeaderStyle Font-Size="Large" Font-Bold="True" BorderWidth="1px" ForeColor="Brown" BorderStyle="Solid" BorderColor="Black" Width="100px" BackColor="#00C0C0"></DayHeaderStyle>
<TitleStyle Font-Size="Large" Font-Bold="True" BorderWidth="1px" BorderStyle="Solid" BorderColor="Black" BackColor="#80FFFF"></TitleStyle>
<WeekendDayStyle BackColor="#C0C0C0"></WeekendDayStyle>
</asp:Calendar>
</form>
</body>
</HTML>
|