asp.net calendar control highlighting special days

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?
 
B

Bruno Alexandre

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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,689
Members
48,796
Latest member
Greg L.

Latest Threads

Top