Jens Fiederer
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?
Is there any way WITHIN the Page_Load handler for me to tell which event triggered the postback?
you can know it setting a flag in all objects events and in the page_prerender you'll get the value
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"?
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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!
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!