I am trying to implement some generic error handling in an MVC web application and I need a way to identify if the postback was caused by a WARP.
My code to catch errors currently redirects to an error page, but in the case of an error durring WARP postback; redirecting to another page does not go well (WARP times out).
What can i look for in the HttpContext to identify that the postback was indeed caused by a WARP panel? Once i gather this information i can then know whether or not to redirect to the error page or back to the page where the WARP post came from and display the error on that page.
With an UpdatePanel i have found this code snippet, is there a similar Header for the WARP?
Thanks!
Found this... Hopefully it is observed in regression testing :)
if (HttpContext.Current.Request.Params["__IG_CALLBACK"] != null){ //This is a WARP async postback}
And now since i know what to search for in google, i found this from Viktor:
Also, the 2009.1 property: Infragistics.Web.UI.Framework.AppSettings.IsAjaxPostBack does not appear to work for WARP's (non Aikido). This might also be do tot he fact that i am checking for this flag in HttpHandler before the page is loaded and this property is set??http://community.infragistics.com/aspnet/codesamples/archives/87892.aspx
Hi Matt,
My issue is that the code where i am checking for errors is a custom implemented HTTP Handler and at this point i need to know if the post was driven by a WARP or by a form submit. I figure that there is some HTTP header that is used much like the Update Panel example i provided above. The issue with your solution is that i do not have a handle on the page or subsequently the WARP object in my custom Http Handler.
Thanks,
Chad
HI,
The Warp has a property that you can test to see if the warp is causing an Async postback.
Here is a code snippet:
' Following property allows to check if WebAsyncRefreshPanel1 is owner of asynchronous postback. If Me.WebAsyncRefreshPanel1.IsAsyncPostBack Then
Here is a help link:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.1/CLR3.5/html/Infragistics35.WebUI.Misc.v9.1~Infragistics.WebUI.Misc.WebAsyncRefreshPanel.html
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.1/CLR3.5/html/Infragistics35.WebUI.Misc.v9.1~Infragistics.WebUI.Misc.WebAsyncRefreshPanel~IsAsyncPostBack.html