[英]How do i get the parameter passed in _dopostback() in endrequest method?
How to I get the parameter value passed in 我如何获得传入的参数值
_dopostback('','');
For Example 例如
__doPostBack('<%=upSubAccount.ClientID %>',true);
I want to get the second parameter in endrequest() handler, here 我想在endrequest()处理程序中获取第二个参数,在这里
//wire the End Request process, //连接结束请求流程,
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;
}
}
The second argument is the event argument. 第二个参数是事件参数。
It is not stored by the framework. 它不是由框架存储的。
However you can easily store it in a variable of your own and access it later. 但是,您可以轻松地将其存储在自己的变量中,以后再访问它。
You only need to replace the __doPostBack
with your own function. 您只需要用自己的函数替换
__doPostBack
。
var orignalDoPostback = __doPostBack;
var lastEventArgument = "";
__doPostBack = function(eventTarget, eventArgument)
{
lastEventArgument = eventArgument;
orignalDoPostback(eventTarget, eventArgument);
}
Then you can use it as required. 然后,您可以根据需要使用它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.