For my particular problem i need to find a way on the client side which UpdatePanel
has been updated. To figure that out on the ServerSide is not quite hard (there's a plentitude of SO Questions about this), but i'd prefer a more generic solution for the client side.
I tried the following things:
- I inspected the
PageRequestManager
client object without success - I checked the value of
$("#__EVENTTARGET").val()
in hope for any ID to work with (always empty)
My scenario is that i've written a script for a control which is executed via Sys.Application.add_init
, which is why EVENTTARGET hidden field may not be filled yet.
My idea would be mixing techniques of ASP.MVC (IHttpModule) and Webforms (like here) to get a clean and generic solution.
Thus my plan is to access params for the request and inject a JS into the response which declares the eventtarget for me.
What i am wondering about now is: Is this a good solution or am i unaware of some existing functionality to figure out which updatepanel was updated? (Or is this an ugly solution and you know a better way to do this)