In OnLoad, which of two ASP.NET controls triggered a given callback?
How do I differentiate between two triggers that can both POST callbacks to the page during OnLoad
? The controls themselves will automatically trigger their callback handlers, but that is too late.
The background on my issue is probably irrelevant, but ... I am creating an ASP.NET web page and I have two controls on the page that can trigger a callback, a "change active tab" event from my DevExpress ASPxTabControl and a "update" button that changes some settings. I only want to load the conte开发者_Python百科nts on the active tab because the tabs are filled with too-heavy computations and so forth. For various reasons, this loading must happen in OnLoad() unless the tab is the one firing the callback, in which case it should happen (only) during the "active tab changed" event.
Maybe you can read the hidden fields associated with callbacks:
__CALLBACKID
(which stores the ID of the ICallbackEventHandler control that will be recieving the callback)__CALLBACKPARAM
(which stores the callback's eventArgument).
You can read these values like this:
Request["__CALLBACKID"]
Request["__CALLBACKPARAM"]
If you decide to use the EventArgument, then you would have to put some value into it that you would be able to read at this point, to give you the issuing control.
精彩评论