asp.net calendar control highlighting special days

  • Thread starter Thread starter jobs at webdos
  • Start date Start date
J

jobs at webdos

Does anybody have a simple vb.net example where you select dates from a
table and highlight them in an asp.net 2.0 calendar?
 
there is plenty of them...

all you need to do is using the DayRender of the calendar property and then
check if the day that the control is rendering is the one you want and if it
is, just do whatever you want with that day cell... change background color,
add text on it, change format, etc...

Sub DayRender(ByVal source As Object, ByVal e As DayRenderEventArgs)

If e.Day.Date = myDate Then

' do something

End if

End Sub

so in your case you need to keep the selected values in a DataTable for
example then on the dayRender of the calendar, just loop through your
datatable dates

:-)
--

Bruno Alexandre
København, Danmark

"a Portuguese in Denmark"

Blog. http://balexandre.blogspot.com/
Photos. http://www.flickr.com/photos/balexandre/
 
Back
Top