Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Re: crazy event handlers! (http://www.velocityreviews.com/forums/t58243-re-crazy-event-handlers.html)

Trevor Hartman 06-25-2003 10:59 PM

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
>
>




MikeB 06-25-2003 11:58 PM

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



PJ 06-26-2003 01:53 AM

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.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57