Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Re: ASP.NET/Ajax Question

Reply
Thread Tools

Re: ASP.NET/Ajax Question

 
 
Microsoft Newsserver
Guest
Posts: n/a
 
      06-17-2008
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.
>
>



 
Reply With Quote
 
 
 
 
Mick Wilson
Guest
Posts: n/a
 
      06-17-2008
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.
 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      06-17-2008
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.
> >
> >

>
>
>

 
Reply With Quote
 
Microsoft Newsserver
Guest
Posts: n/a
 
      06-18-2008
Any samples you can point me to in order for me to try this out.



"Mick Wilson" <> wrote in message
news:1186d7f8-7674-4cbd-bda1-...
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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
question row filter (more of sql query question) =?Utf-8?B?YW5kcmV3MDA3?= ASP .Net 2 10-06-2005 01:07 PM
Quick Question - Newby Question =?Utf-8?B?UnlhbiBTbWl0aA==?= ASP .Net 4 02-16-2005 11:59 AM
Question on Transcender Question :-) eddiec MCSE 6 05-20-2004 06:59 AM
Question re: features of the 831 router (also a 924 question) Wayne Cisco 0 03-02-2004 07:57 PM
Syntax Question - Novice Question sean ASP .Net 1 10-20-2003 12:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57