txtDateofAccident.Attributes["max"] = DateTime.Now.ToString("yyyy-MM-dd");
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e) { if (!e.Day.Date > DateTime.Now.Date) e.Cell.BackColor=System.Drawing.Color.Red; }
<asp:Calendar id="calendar1" OnDayRender="DayRender" runat="server">
void DayRender(Object source, DayRenderEventArgs e) { if (e.Day.Date > DateTime.Now.Date) e.Cell.BackColor=System.Drawing.Color.Red; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)