Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Re: ASP.NET/Ajax Question (http://www.velocityreviews.com/forums/t620761-re-asp-net-ajax-question.html)

Microsoft Newsserver 06-17-2008 11:21 AM

Re: ASP.NET/Ajax Question
 
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.
>
>




Mick Wilson 06-17-2008 01:40 PM

Re: ASP.NET/Ajax Question
 
On Jun 17, 7:21*am, "Microsoft Newsserver" <m...@nowhere.com> 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.

bruce barker 06-17-2008 03:36 PM

Re: ASP.NET/Ajax Question
 
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.
> >
> >

>
>
>


Microsoft Newsserver 06-18-2008 11:21 AM

Re: ASP.NET/Ajax Question
 
Any samples you can point me to in order for me to try this out.



"Mick Wilson" <mick.wilson@gmail.com> wrote in message
news:1186d7f8-7674-4cbd-bda1-a05c20b17fe1@79g2000hsk.googlegroups.com...
On Jun 17, 7:21 am, "Microsoft Newsserver" <m...@nowhere.com> 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.




All times are GMT. The time now is 07:59 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.