|
Rank: Member Groups: Member
Joined: 7/14/2009 Posts: 15
|
Hi,
Problem: We are looking for cancelling the Callback execute method if the Dialog cancel button is clicked.
Done so far: We used the function OnDialogCancel and called eo_CancelEvent() method. But, the problem is that the Callback execute method executes is already executing at the background.
It will be highly appreciated if we can get some assistance
Thanks,
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I assume you have the dialog's CancelButtonPostBack set to true. If that is the case, there is no way to stop the post back from inside OnDialogCancel handler. If you wish to cancel the post back, you have to do it the other way around: set CancelButtonPostBack to fasle, and then call __doPostBack to start the postback when you do need to postback and do not call it when you do not need to post back.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 7/14/2009 Posts: 15
|
Thanks.
I tried with your solution but still the callback execution couldn't stop.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Callback execution only occurs when you have a post back (which triggers server events). What we suggested to do is to DO NOT do post back when you do not want it. As soon as the post back does not occur nothing should happen. If it still occurs, then it means you are still doing a post back. If you believe the post back is incorrectly triggered by us, you can isolate the problem into a test page and we will be happy to take a look. Otherwise it will be either ASP.NET or your code, you will need to troubleshoot it yourself for those cases because our support neither troubleshoot user code nor offer support on general ASP.NET programming issues.
Thanks
|
|
Rank: Member Groups: Member
Joined: 7/14/2009 Posts: 15
|
Thanks. I'll give another shot on this.
|
|
Rank: Member Groups: Member
Joined: 7/14/2009 Posts: 15
|
No luck so far. After reading your feedback my understanding is that if the callback execution has started there is no way to cancel or stops the further execution. M'I correct? In our scenario we open the context menu and on click of menu item the postback execution starts with the dialog box. This dialog box is having a cancel button and on cancel button click event we are saying eo_cancelevent(). The moment we click the cancel button the dialog box disappears but the postback keep going on. May be we are not the right code but here is an example which we are looking to implement. The only different in this example and our code is clicking the menu item in the context menu. http://mattberseth2.com/cancel_async_postback/Default2.aspx
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Nick wrote:After reading your feedback my understanding is that if the callback execution has started there is no way to cancel or stops the further execution. M'I correct? That is correct. You have the choice to start or not to start it. Once it is started, we have the choice to let it to proceed as a regular post back (full post back) or convert it to an AJAX postback (partial post back). In another word, once it is started, it precedes one way or another. Nick wrote:In our scenario we open the context menu and on click of menu item the postback execution starts with the dialog box. This dialog box is having a cancel button and on cancel button click event we are saying eo_cancelevent(). The moment we click the cancel button the dialog box disappears but the postback keep going on. May be we are not the right code but here is an example which we are looking to implement. The only different in this example and our code is clicking the menu item in the context menu. http://mattberseth2.com/cancel_async_postback/Default2.aspx Our tech support won't really provide coding assistance. So we won't look into something that you wish to implement and help you to devise a plan to implement that. We can only tell you what our controls do and when it does what. Sorry about it!
|
|