Hi
To disable specific days in asp.net calendar control.
For that your aspx page should be like this.
You can do this in
DAYRENDER Event in asp.net.
<asp:Calendar ID="Calendar1" runat="server" OnDayRender="Calendar1_DayRender"></asp:Calendar>
Your cs page should be like this:
In that event you should write the code like this
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
if (e.Day.Date.DayOfWeek == DayOfWeek.Saturday || e.Day.Date.DayOfWeek == DayOfWeek.Sunday)
{
e.Day.IsSelectable = false;
e.Cell.ForeColor = System.Drawing.Color.Blue;
}
}
You have to do like this.
Thanks & Regards,
Santhi .V
Murugavelmsc, if this helps please login to Mark As Answer. | Alert Moderator