473,608 Members | 2,565 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

One of 12 Calendars DayRender event does not work on PostBac

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_DayR ender(ByVal sender As Object, ByVal e As
System.Web.UI.W ebControls.DayR enderEventArgs) Handles Calendar11.DayR ender
Dim c As Integer
For c = 0 To x - 1
If e.Day.Date.Mont h = Month(datinf(c) ) Then
If e.Day.Date.Day = Day(datinf(c)) = True Then
e.Cell.BackColo r = System.Drawing. Color.Red
End If
End If
Next c
End Sub
Private Sub Calendar12_DayR ender(ByVal sender As Object, ByVal e As
System.Web.UI.W ebControls.DayR enderEventArgs) Handles Calendar12.DayR ender
Dim c As Integer
For c = 0 To x - 1
If e.Day.Date.Mont h = Month(datinf(c) ) Then
If e.Day.Date.Day = Day(datinf(c)) = True Then
e.Cell.BackColo r = System.Drawing. Color.Red
End If
End If
Next c
End Sub
Dec 28 '05 #1
1 2047
COULD SOMEONE PLEASE HELP ME ON THIS?
Mariano

"Mariano Padilla" wrote:
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_DayR ender(ByVal sender As Object, ByVal e As
System.Web.UI.W ebControls.DayR enderEventArgs) Handles Calendar11.DayR ender
Dim c As Integer
For c = 0 To x - 1
If e.Day.Date.Mont h = Month(datinf(c) ) Then
If e.Day.Date.Day = Day(datinf(c)) = True Then
e.Cell.BackColo r = System.Drawing. Color.Red
End If
End If
Next c
End Sub
Private Sub Calendar12_DayR ender(ByVal sender As Object, ByVal e As
System.Web.UI.W ebControls.DayR enderEventArgs) Handles Calendar12.DayR ender
Dim c As Integer
For c = 0 To x - 1
If e.Day.Date.Mont h = Month(datinf(c) ) Then
If e.Day.Date.Day = Day(datinf(c)) = True Then
e.Cell.BackColo r = System.Drawing. Color.Red
End If
End If
Next c
End Sub

Jan 28 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1636
by: Superman and the Seven Dwarfs | last post by:
when the page is loaded, the dayrender event is triggered, which displays content, such as holidays, on the asp:calendar control. how do i programmatically re- dayrender a calendar so that when i add a new holiday on the calendar, the holiday would be displayed?
0
1467
by: CodeRazor | last post by:
Hi, I have been using the DayRender event of the calendar control to format the appearance of my calendar control, and it works ok. However, because of the way the DayRender event works, it will fire once for each day in the calendar control, so if i am displaying july, it will fire 31 times, even if i only require formatting for 2 particular days. So, my question is, is there a more efficient way to access a day in the
2
7552
by: Bruce W..1 | last post by:
I want to change the display style of certain days in my Calendar control. This is done with the DayRender event. So I put this in the codebehind: private void Calendar1_DayRender (object sender, System.Web.UI.WebControls.DayRenderEventArgs e) { // Display weekend dates in green boxes. Style weekendStyle = new Style(); weekendStyle.BackColor = System.Drawing.Color.Green;
2
4569
by: VB Programmer | last post by:
How can I force the DayRender event of my Calendar to run/refresh? The calendar displays data from a database and I am allowing the user to filter out what data they see on the calendar. When they click "Update Calendar" I want to force the DayRender events to reprocess. I don't want to simply do a response.redirect to the page. Thanks.
0
1084
by: Mariano Padilla | last post by:
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. ...
1
1937
by: Peter | last post by:
I tried to initialize a date in Calendar control with DayRender event handler as the following code: protected void Calendar1_DayRender(object sender, DayRenderEventArgs e){ e.Cell.ForeColor = System.Drawing.Color.Pink; Calendar1.SelectedDate = new DateTime(2002, 7,16); } The first line works by seeing pink color. The second line does not work, that is the data. Please advise. Thanks. Peter
0
999
by: dodjem | last post by:
Hi all, I have search far and wide for a solution but have been unsuccessful. I have a database table which contains bookings for resources that can be used in our lab and some bookings can span over several days - minimum one day booking. I can get bookings to display the user of the item on the start date of the booking using the DayRender method ok, but i want it to show the user's name on every day that the booking spans over. I...
0
1739
by: champagne.supernova1974 | last post by:
Hi Can anyone help with a quick question? I am adding a textbox into each "day" cell of a calendar control, by using the following code in the DayRender event: Protected Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles
2
3263
by: Tigers07 | last post by:
I've been banging my head on a problem all day and am looking for some advice. I'm fairly new to asp.net/vb.net so I appologize if this seems a bit elementary. Anyway, what I'm doing is displaying 12 calendar controls on a page and attempting to update them with holiday and eventually vacation information. The methods SetCalendarValues() and GetCurrentMonthData() work as expected, however, I'm not quite sure how to incorporate the method...
0
7998
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8491
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8142
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6813
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6010
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3959
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2472
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1580
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1327
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.