ASP.NET AJAX Timer + UpdatePanel + Server Request Timeouts

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!
 
G

Guest

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
 
U

urmilshah

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top