Rank: Advanced Member Groups: Member
Joined: 6/5/2007 Posts: 35
|
I have pages that use callback panels. The code behind includes checks for errors; when an error occurs, the code behind invokes a utlity method to bring up an error page to display the error information. However, unlike page.Response.Redirect("errorpage.aspx"), callbackpanel.Redirect("errorpage.aspx") does not force immediate termination of current processing. Code following the callbackpanel.Redirect() gets executed, which may or may not cause a problem (it often does!)
I guess I could throw an exception and catch that somehwere but that seems a pretty crude approach. Is there a way of forcing an immediate terminaton of a callback? If not, would you add that capability in?
Thanks
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The page will continue to complete its life cycle regardless you throw out an exception or not. So the cleanest way is to use if statement to skip code that you do not want to execute. This is not something we can add on the control because a control can not change the page's execution flow.
Thanks
|