Private Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar1.DayRender Dim day As CalendarDay = e.Day Dim cell As TableCell = e.Cell Dim lblEvent As New Label() Select Case day.Date Case #2/10/2011# lblEvent.Text = "party" cell.Controls.Add(lblEvent) cell.BackColor = Drawing.Color.Red Case #2/14/2011# lblEvent.Text = "holiday" cell.Controls.Add(lblEvent) cell.BackColor = Drawing.Color.DarkOrange Case #2/28/2011# lblEvent.Text = "3rd event" cell.Controls.Add(lblEvent) cell.BackColor = Drawing.Color.DarkOrange End Select End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)