One of 12 Calendars DayRender event does not work on PostBac

G

Guest

I poste the below on 11-28-05 and got no answer. Could anyone please help me?

I have a form that has 12 Calendar, 1 for each month. I am retrieving
information from a database separately, assigning them to an array and then
in the DayRender Event, itterating through the array to mark the days that I
have in the database for each calendar. Basically a year view of what dates
are blocked and what days are free. Booking calendar.

The problem is that when the page posts back, the first 11, Jan-Nov,
calendars work. December's postback blanks out all dates as if it has
nothing marked. However, if I close the page and open it again, then
December's calendar works fine. It is only on PostBack that the callendar
does not fire the PostBack event.

Is there a limit for how many calendars one can use on a page?

Is there another way to force the DayRender event to trigger?

How can I verify that all of the DayRender Events have been triggered.

Below is my DayRender Code only for 2 caledars. Notice they are exactly the
same, except for the calendar ID.

Private Sub Calendar11_DayRender(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar11.DayRender
Dim c As Integer
For c = 0 To x - 1
If e.Day.Date.Month = Month(datinf(c)) Then
If e.Day.Date.Day = Day(datinf(c)) = True Then
e.Cell.BackColor = System.Drawing.Color.Red
End If
End If
Next c
End Sub
Private Sub Calendar12_DayRender(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar12.DayRender
Dim c As Integer
For c = 0 To x - 1
If e.Day.Date.Month = Month(datinf(c)) Then
If e.Day.Date.Day = Day(datinf(c)) = True Then
e.Cell.BackColor = System.Drawing.Color.Red
End If
End If
Next c
End Sub
 

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
473,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top