By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,686 Members | 2,770 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,686 IT Pros & Developers. It's quick & easy.

Events Dilemma

P: n/a
I have a page that generates a grid of controls; at the end of each row is
an update button that is dynamically created with an associated click event.
The grid changes based on the date selected in the calendar control and I
populate this grid of controls by calling a routine in the page load event.
My dilemma is that the page load event executes before my grid control event
during a postback, thus the date that the grid references does not reflect
the date on the calendar control.

An obvious solution I though of was to populate the grid using the calendar
event but I also need an update after the dynamically created button events.
When I tried putting the routine in the dynamically created button event and
click the button, there is a post back but it doesn't run the click routine
(which it does if I load the grid from the page load event).
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Bishop,

Page_Load is only one of about a dozen Page events that occur during the
Page Execution LifeCycle. The following link gives complete information
about all the events that transpire, and when each occurs:

http://msdn.microsoft.com/library/de...nLifecycle.asp

The issue is sequence. Make sure that all of your operations occur in the
right sequence.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Bishop" <ke**@dcnconsulting.com> wrote in message
news:O7**************@TK2MSFTNGP14.phx.gbl...
I have a page that generates a grid of controls; at the end of each row is
an update button that is dynamically created with an associated click event. The grid changes based on the date selected in the calendar control and I
populate this grid of controls by calling a routine in the page load event. My dilemma is that the page load event executes before my grid control event during a postback, thus the date that the grid references does not reflect
the date on the calendar control.

An obvious solution I though of was to populate the grid using the calendar event but I also need an update after the dynamically created button events. When I tried putting the routine in the dynamically created button event and click the button, there is a post back but it doesn't run the click routine (which it does if I load the grid from the page load event).

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.