Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
446
How to identify postback is caused by a WARP within HttpContext
posted

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?

if (HttpContext.Current.Request.Headers["X-MicrosoftAjax"] != null)

{

//This is a UpdatePanel async postback

}

 

Thanks!