如何在 add_endRequest 中获取导致回发的元素的 ID?
示例
//连接结束请求过程,
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(requestComplete_Handler)
//will be called after the async request completes.
function requestComplete_Handler(sender, args)
{
var panel = sender._postBackSettings.sourceElement.id;
switch (panel)
{
case "<%=upSubAccount.ClientID %>":
__doPostBack('<%=upAllocationChart.ClientID%>');
break;
case "<%=upAllocationChart.ClientID%>" :
__doPostBack('<%=upTotal.ClientID %>');
break;
}
}
虽然这有效,但不是每次都
sender._postBackSettings.sourceElement.id;
谢谢。