Pages

Friday, 17 February 2012

ASP.NET code to Control how a day is rendered in a calender (C# Code)

Day Render is used to set the speciality of the day in a calender...in order to remember a perticular day,or as a reminder for the day,Hope this cod may helpfull to you...
protected void Calender1_DayRender(object sender, DayRenderEventArgs e)
{
         e.Cell.VerticalAlign = VertivcalAlign.top ;
         if ( e.Day.DayNumber.Text = = " 25 " )
         {
                e.Cell.Controlls.Add ( new LiteralConrol ( "<p>User Group Meeting </p>" ) ) ;
                e.Cell.BorderColor  = System.Drawing.Color.Black ;
                e.BorderWidth = 1 ;
                e.Cell.BorderStyle = BorderStyle.Solid ;
                e.Cell.BackColor = System.Drawing.Color.LightGray ;
         }
}

No comments:

Post a Comment