Link to home
Start Free TrialLog in
Avatar of Jens Fiederer
Jens FiedererFlag for United States of America

asked on

How can I determine the event that caused a Page_Load?

When an event triggers a postback, I normally see a Page_Load occur before the event handler is called.

Is there any way WITHIN the Page_Load handler for me to tell which event triggered the postback?
Avatar of Elvio Lujan
Elvio Lujan
Flag of Argentina image

you can know it setting a flag in all objects events and in the page_prerender you'll get the value
Avatar of Jens Fiederer

ASKER

page_prerender is not Page_Load.

Are you trying to say there is no way to tell IN Page_Load?

And what do you mean by "setting a flag in all objects events"?
ASKER CERTIFIED SOLUTION
Avatar of David H.H.Lee
David H.H.Lee
Flag of Malaysia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That was useful, x_com.

Not quite what I asked for: there must be situations where more than one type of event causes postback for a control, and also this does not always work (I get a blank when pushing the button).

But it is quite likely that what I asked for does not exist, and in my situation this solves my problem splendidly!  So I am happy!

Note for when this is PAQed:  the "name of the control" is not the .NET name but the HTML form name.  So when a radiobuttonlist gets clicked, you will see selOperation_0 or selOperation_1, not selOperation.

Thank you!