Gaurav Taneja

Great dreams... never even get out of the box. It takes an uncommon amount of guts to put your dreams on the line, to hold them up and say, "How good or how bad am I?" That's where courage comes in.

  Home  |   Contact  |   Syndication    |   Login
  82 Posts | 1 Stories | 40 Comments | 7 Trackbacks

News




Google RankGoogle PR™ - Post your Page Rank with MyGooglePageRank.com



The content on this site represents my own personal opinions and thoughts at the time of posting, and does not reflect those of my employer's in any way.

Disclaimer:- All postings in this blog is provided "AS IS" with no warranties, and confers no rights.

Archives

Post Categories

Image Galleries

Atlas

Error

OutLook

SharePointService

Usefull Site Links

Well while implementing Ajax i had received error due to Sys.WebForms.PageRequestManagerParserErrorException

the best solution that i could figure out to over come is catch this exception and byPass it.. if any body has a good way of catching this exception why this arise Please do let me know.

i has to modify the script

<script type="text/javascript">
                                        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function (sender, args)
                                        {
                                          
                                             if (args.get_error()!=null)
                                             {
                                                                                        
                                                 if (args.get_error().name === 'Sys.WebForms.PageRequestManagerParserErrorException')
                                                 {
                                                   
                                                    // remember to set errorHandled = true to keep from getting a popup from the AJAX library itself
                                                    args.set_errorHandled(true);
                                                     window.location.href='Login.aspx?Message=SessionExpired';
                                                }                                                
                                                 if ( args.get_error().name === 'Sys.WebForms.PageRequestManagerTimeoutException')
                                                {
                                                  
                                                    // remember to set errorHandled = true to keep from getting a popup from the AJAX library itself
                                                    args.set_errorHandled(true);
                                                    window.location.href='Login.aspx?Message=SessionExpired';
                                                }
                                             
                                             }
                                         }
                                         );
                                     </script>
posted on Wednesday, April 16, 2008 10:50 PM

Feedback

# re: Sys.WebForms.PageRequestManagerParserErrorException + Ajax 12/1/2008 3:50 AM Stéphane D.
Great! Thanks for your code.
That works very good.




# re: Sys.WebForms.PageRequestManagerParserErrorException + Ajax 2/27/2009 3:16 AM Muhammad Nadir Siddiqui
Great ! I used that script on my page. its working man ! thanks for your efforts!

# re: Sys.WebForms.PageRequestManagerParserErrorException + Ajax 8/31/2009 2:03 PM RadAmant0
Great code man!!! but in my case i dont want to redirect to login page, instead, I send a second click to the button, and this time, everything works fine. Thnx!!!

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: