Dear all,
I have a calendar control in my webpage. So when i run the webpage then current day will be highlighted with red color.
How to do this?
thanks
Loading
Dear all,
I have a calendar control in my webpage. So when i run the webpage then current day will be highlighted with red color.
How to do this?
thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Jan 8, 2012, 1:18 PM
Try this...
In DayRender event of calender control write the below code
Protected Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar1.DayRender
If e.Day.IsToday Then
e.Cell.BackColor = Drawing.Color.Red
End If
End Sub
Thanks