Welcome Guest Search | Active Topics | Sign In | Register

How to determine if request is a callback without reference to a CallbackPanel Options
Code Monkey
Posted: Wednesday, April 23, 2008 7:15:14 AM
Rank: Advanced Member
Groups: Member

Joined: 2/11/2008
Posts: 37
I have a pre-existing project that I'm adding some functionality to. Things are going well with using the EO controls now, but I've run into a roadblock: Some parts of the business logic initiate a page change via Response.Redirect, and that is a problem when that happens during a callback from a CallbackPanel.

Now I've found that for in-page stuff I can use the .IsCallback property of a CallbackPanel on the page, but deep in the business logic class I have no reference to any CallbackPanel to check this.

It would be nice if the CallbackPanel could intercept the Request.Redirect and handle it correctly, but I realize that may not be possible.

Would it be possible to add a static method to the Callback class that can determine if the current request is a callback? Or is there another method to determining if the request is a callback?

Would a static version of CallbackPanel.Redirect also be possible? If .IsCallback and .Redirect were static that would be easier to integrate into more situations.

Thanks in advance.

eo_support
Posted: Wednesday, April 23, 2008 7:20:27 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,092
Hi,

Try checking Request.Form["eo_cb_id"]. If that variable exists, then it's a callback from us.

Thanks
Code Monkey
Posted: Wednesday, April 23, 2008 7:25:27 AM
Rank: Advanced Member
Groups: Member

Joined: 2/11/2008
Posts: 37
Ok, thank you, that helps.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.