Know the object does the postback

  • Thread starter Thread starter Erick
  • Start date Start date
E

Erick

Hi,

Is there any way that I can know the object that does
fires or does postback to the page on the Page_Load event.

I tried to use the sender object that is defined as
parameter into this event.

Thanks for any help provied.

Cheers...
 
There's not a great way.
Generally the best solution is to simply move your Page_Load code to the
PreRender event , which happens after
all the control events. So by then the control that caused the postback
should have its event handled and you can set a flag or something to let you
know which one caused it.
 
Back
Top