Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programmatic Control Events
Message
From
13/11/2009 14:39:32
 
 
To
13/11/2009 10:02:42
General information
Forum:
ASP.NET
Category:
AJAX
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01434606
Message ID:
01434670
Views:
40
For any interested. After some more research it turns out that the Calendar DayRender event probably occurs too late in the Page Life Cycle to fire the ImageButton Command event so if you are placing controls in the Day cells of the Calendar and need this functionality a workaround will be necessaary.

Bill

>I have an ASP.NET 2.0 form with a MS AJAX UpdatePanel on it. In the update panel there is an ASP.NET Calendar control. In the DayRender event of the Calendar I programmatically add an ImageButton, set its properties and add a Command event handler to it:
>
ib.Command += new CommandEventHandler(this.ImageButton_Command)
>Clicking the image button will force a postback but the programmatically added Command event handler does not fire.
>
>I have run tests by both manually and programmatically placing an image button on another part of the form and setting the Command event handler and the event handler properly fires. I am wondering if it has something to do with adding the image button to the Calendar control control hierarchy and its interaction with the AJAX Update Panel.
>
>Has anyone seen this, knows what the issue is, and how to resolve it?
>
>Thanks,
>Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform