Re: ASP.NET/Ajax Question

Discussion in 'ASP .Net' started by Microsoft Newsserver, Jun 17, 2008.

  1. Sorry - This should have been pasted

    I am running ASP.NET 2.0 with Ajax.


    I am invoking an asyncronous postback by invoking a button click which
    triggers the async postback. This works fine, but I need to take into
    consideration the success or not of the request.


    //Pseudo Code.


    __doPostBack( 'btnMyButton.......

    alert('Thank you, your request has been completed');


    OK, no what is happening of course is that the alert pops up before the
    relative update panels are updated on the client.

    I need to be able to

    a.) Sync my 'Thank You' Message with the reuest being complete.
    b.) Take into consideration that a timeout may occur.


    Any constrcutive suggestions to do this would be greatly appreciated.

    Thanks ....


    > //Pseudo Code.
    >
    >
     
    Microsoft Newsserver, Jun 17, 2008
    #1
    1. Advertising

  2. Microsoft Newsserver

    Mick Wilson Guest

    On Jun 17, 7:21 am, "Microsoft Newsserver" <> wrote:
    >
    > __doPostBack( 'btnMyButton.......
    >
    > alert('Thank you, your request has been completed');
    >
    > OK, no what is happening of course is that the alert pops up before the
    > relative update panels are updated on the client.
    >
    > I need to be able to
    >
    >     a.) Sync my 'Thank You' Message with the reuest being complete.
    >    b.) Take into consideration that a timeout may occur.
    >


    Why not replace your javascript alert with a Modal Popup Extender? if
    the latter is in the update panel, it would be in sync with the
    partial postback and you'd (probably) have enough control over it
    server side to handle the timeout issue.
     
    Mick Wilson, Jun 17, 2008
    #2
    1. Advertising

  3. Microsoft Newsserver

    bruce barker Guest

    assuming you are using the ajax library for the postback, you use the
    Sys.WebForms.PageRequestManager class to register a handler for the
    endRequest Event:

    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(callback);

    the callback will be passed an error if there is one.

    -- bruce (sqlwork.com)


    "Microsoft Newsserver" wrote:

    > Sorry - This should have been pasted
    >
    > I am running ASP.NET 2.0 with Ajax.
    >
    >
    > I am invoking an asyncronous postback by invoking a button click which
    > triggers the async postback. This works fine, but I need to take into
    > consideration the success or not of the request.
    >
    >
    > //Pseudo Code.
    >
    >
    > __doPostBack( 'btnMyButton.......
    >
    > alert('Thank you, your request has been completed');
    >
    >
    > OK, no what is happening of course is that the alert pops up before the
    > relative update panels are updated on the client.
    >
    > I need to be able to
    >
    > a.) Sync my 'Thank You' Message with the reuest being complete.
    > b.) Take into consideration that a timeout may occur.
    >
    >
    > Any constrcutive suggestions to do this would be greatly appreciated.
    >
    > Thanks ....
    >
    >
    > > //Pseudo Code.
    > >
    > >

    >
    >
    >
     
    bruce barker, Jun 17, 2008
    #3
  4. Any samples you can point me to in order for me to try this out.



    "Mick Wilson" <> wrote in message
    news:...
    On Jun 17, 7:21 am, "Microsoft Newsserver" <> wrote:
    >
    > __doPostBack( 'btnMyButton.......
    >
    > alert('Thank you, your request has been completed');
    >
    > OK, no what is happening of course is that the alert pops up before the
    > relative update panels are updated on the client.
    >
    > I need to be able to
    >
    > a.) Sync my 'Thank You' Message with the reuest being complete.
    > b.) Take into consideration that a timeout may occur.
    >


    Why not replace your javascript alert with a Modal Popup Extender? if
    the latter is in the update panel, it would be in sync with the
    partial postback and you'd (probably) have enough control over it
    server side to handle the timeout issue.
     
    Microsoft Newsserver, Jun 18, 2008
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QnJpYW4gRWR3YXJkcw==?=

    Deploying ASP.NET AJAX-Enabled Web site to host without AJAX insta

    =?Utf-8?B?QnJpYW4gRWR3YXJkcw==?=, Feb 20, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    634
    Patrick
    Feb 21, 2007
  2. minnie
    Replies:
    1
    Views:
    758
    Andrew Thompson
    Dec 13, 2006
  3. mark4asp
    Replies:
    1
    Views:
    1,199
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Mar 24, 2007
  4. Tony K
    Replies:
    2
    Views:
    1,105
    Tony K
    May 4, 2007
  5. Nathan Sokalski
    Replies:
    2
    Views:
    516
    Nathan Sokalski
    Jun 2, 2007
Loading...

Share This Page