ASP.NET AJAX Timer + UpdatePanel + Server Request Timeouts

  • Thread starter Thread starter webdevaccount
  • Start date Start date
W

webdevaccount

Hello,

I am using a Timer and an UpdatePanel control. The Timer is set to
1000 milliseconds, and therefore results in many server request
timeouts error (logical). The Server Request Timeout error does not
result in a redirection to a blank error page, but rather a pop-up
message describing the error appears.

My Question: Is there any way to catch this error and prevent it from
being displayed?

Thank you for your time!
 
Hi there,

I reckon you could handle endRequest event of the PageRequestManager class:

<script type="text/javascript">

function onEndRequest(sender, e)
{
var err = e.get_error();

if (err != null &&
err.name === 'Sys.WebForms.PageRequestManagerTimeoutException')
{
e.set_errorHandled(true);
}
}

Sys.WebForms.PageRequestManager.instance.add_endRequest(onEndRequest);

</script>

hope this helps
 
I am using update panel and timer it shows me
Sys.WebForms.PageRequestManagerTimeoutException message after 90
seconds which is correct i want to show user understandable message to
the user how can i do that?

- Urmil
 
Back
Top