I want to know Id update panel that initial a request in JavaScript .I write this script but it return undefined
.
var prm = Sys.WebForms.PageRe
You can use the get_updatePanelsToUpdate
that return an array with the Ids of the UpdatePanels that will be going to updated.
<script>
window.onload = function() {
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(InitializeRequest);
prm.add_endRequest(EndRequest);
};
function InitializeRequest(sender, args)
{
// get the array of update panels id
var UpdPanelsIds = args.get_updatePanelsToUpdate();
// get the Post ID
args.get_postBackElement().id;
}
function EndRequest(sender, args) {
}
</script>
http://msdn.microsoft.com/en-us/library/ee224805.aspx