How to handle errors during ajax requests

2 posts, 0 answers
  1. saravanan k
    saravanan k avatar
    88 posts
    Member since:
    Mar 2010

    Posted 26 Apr 2010 Link to this post


    I am having an asp ajax update panel and rad loading panel. I am using the below code to show the loading panel during ajax requests. I have a timer which keeps polling a DB for a specific interval.


    If the page is inactive for a long time, the session expires, but the timer is still polling the DB. Due to the session expiry or due to some error from the server, a script error is thrown. How do i handle this in the below code?


            var loadingPanel = "";  
            var pageRequestManager = Sys.WebForms.PageRequestManager.getInstance();  
            var postBackElement = "";  
            function initializeRequest(sender, eventArgs) {  
                loadingPanel = $find('<% = RadAjaxLoadingPanel1.ClientID %>');  
                postBackElement = eventArgs.get_postBackElement().id;  
            function endRequest(sender, eventArgs) {  
                loadingPanel = $find('<% = RadAjaxLoadingPanel1.ClientID %>');  

  2. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 26 Apr 2010 Link to this post

    Hello saravanan,

    Please review the following help topic which elaborates on this matter.

    I hope it helps.

    All the best,
    Maria Ilieva
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top