AspxCallback EndCallback event doesnt work

你说的曾经没有我的故事 提交于 2019-12-13 05:09:58

问题


I had a working aspxcallback, today it started not working. I tried everything, changed the control, gave it a new name, added a new aspxcallback control. But none of them make it working.

<dxcb:ASPxCallback ID="pageCloseCall" runat="server" 
    ClientInstanceName="pgCloseCS" OnCallback="pageCloseCall_Callback">
    <ClientSideEvents EndCallback="function(s,e)
        {
            window.returnValue = e.result;
            self.close();
        }" />
</dxcb:ASPxCallback>

Thanks for the help. Mehmet Serif Tozlu


回答1:


Handle the ASPxCallback's client side CallbackComplete event instead. Does it work?




回答2:


<dxcb:ASPxCallback ID="pageCloseCall" **ClientInstanceName="pageCloseCall1"** runat="server" ClientInstanceName="pgCloseCS" OnCallback="pageCloseCall_Callback"> <ClientSideEvents EndCallback="function(s,e) { window.returnValue = e.result; self.close(); }" /> </dxcb:ASPxCallback>

First you have to add ClientInstanceName Attribute. Then on the server side, in the event that will trigger your AspxCallBack, you should be calling .PerformCallback() that causes the call of pageCloseCall_Callback to take place. NB: pageCloseCall1.PerformCallback() uses ClientInstanceName instead of ID.

Regrads, Andoura



来源:https://stackoverflow.com/questions/5238187/aspxcallback-endcallback-event-doesnt-work

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!