![]() |
Re: crazy event handlers!
it is in the buildTable(), which is executed in the Page_PreRender() event
-Trevor "MikeB" <mailbox.google@mailnull.com> wrote in message news:uOdkZ02ODHA.2244@TK2MSFTNGP11.phx.gbl... > > "Trevor Hartman" <synapsee@hotmail.com> wrote in message > news:ecc6Nl2ODHA.2700@tk2msftngp13.phx.gbl... > > Hi, > > > > ok I'm adding an event handler programmatically: > > editButton.Click += new System.EventHandler(Edit); > > > > there is an edit function. there are no errors. When i click on the edit > > button it just posts back but the Edit function doesn't execute! any > > ideas?? thanks! > > In what method do you have the above line of code? > > -- > MikeB > > |
Re: crazy event handlers!
"Trevor Hartman" <synapsee@hotmail.com> wrote in message news:e8iOH22ODHA.1364@TK2MSFTNGP10.phx.gbl... > it is in the buildTable(), which is executed in the Page_PreRender() event > PreRender happens after postback events fire. You should probably add your Edit event handler in the PageLoad event. > -Trevor > "MikeB" <mailbox.google@mailnull.com> wrote in message > news:uOdkZ02ODHA.2244@TK2MSFTNGP11.phx.gbl... > > > > "Trevor Hartman" <synapsee@hotmail.com> wrote in message > > news:ecc6Nl2ODHA.2700@tk2msftngp13.phx.gbl... > > > Hi, > > > > > > ok I'm adding an event handler programmatically: > > > editButton.Click += new System.EventHandler(Edit); > > > > > > there is an edit function. there are no errors. When i click on the > edit > > > button it just posts back but the Edit function doesn't execute! any > > > ideas?? thanks! > > > > In what method do you have the above line of code? > > > > -- > > MikeB > > > > > > -- MikeB |
Re: crazy event handlers!
The Page_Load event happens after the viewstate has been reassigned to the
controls, therefore you need to assign your event handler in the Page_Init event. "Trevor Hartman" <synapsee@hotmail.com> wrote in message news:e8iOH22ODHA.1364@TK2MSFTNGP10.phx.gbl... > it is in the buildTable(), which is executed in the Page_PreRender() event > > -Trevor > "MikeB" <mailbox.google@mailnull.com> wrote in message > news:uOdkZ02ODHA.2244@TK2MSFTNGP11.phx.gbl... > > > > "Trevor Hartman" <synapsee@hotmail.com> wrote in message > > news:ecc6Nl2ODHA.2700@tk2msftngp13.phx.gbl... > > > Hi, > > > > > > ok I'm adding an event handler programmatically: > > > editButton.Click += new System.EventHandler(Edit); > > > > > > there is an edit function. there are no errors. When i click on the > edit > > > button it just posts back but the Edit function doesn't execute! any > > > ideas?? thanks! > > > > In what method do you have the above line of code? > > > > -- > > MikeB > > > > > > |
| All times are GMT. The time now is 12:30 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.