Change the default async timeout error message

Last post 05-15-2007 4:23 AM by Raymond Wen - MSFT. 1 replies.

Sort Posts:

  • Change the default async timeout error message

    05-08-2007, 1:13 PM
    • Member
      47 point Member
    • mcgurk
    • Member since 04-10-2006, 6:38 PM
    • Columbia, SC
    • Posts 18
    I can't believe this question hasn't been asked before... How do I change the message that is displayed to the user when an async postback has timed out?  I've searched the scriptmanager documentation and tried to handle the asyncpostbackerror or whatever event (which doesn't fire on a timeout), but I can't figure out how to do it.  Any hints will be appreciated.  Thanks.
    you're doing it wrong -- youredoingitwrong.mee.nu
  • Re: Change the default async timeout error message

    05-15-2007, 4:23 AM
    Answer
    Hi,

    You can add your own error handler as the following code:
    function StartAsyncPostBack() {
    WebService.set_timeout(2000);
    WebService.RunForLongTime(0, Complete, OnError); // call a method with the signature of RunForLongTime(int);
    }
    function OnError(result) {// your error handler
    alert("error: " + result.get_message());
    }

    Hope this helps.




Page 1 of 1 (2 items)