Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

How do I do asynchronous tasks in a web page?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan Silver - 02 Mar 2008 19:37 GMT
Hello,

I have a web page that makes several requests of other pages during its
processing. At the moment it does these one after the other.

To speed things up, I would like to make these requests asynchronously.
Trouble is, I'm not sure how to do this.

Any pointers would be greatly appreciated. TIA

Signature

Alan Silver
(anything added below this line is nothing to do with me)

Peter Bromberg [C# MVP] - 02 Mar 2008 23:08 GMT
Here is an article I did a while back that covers most of the basics:
http://www.eggheadcafe.com/articles/20060918.asp
Hope it helps.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net

> Hello,
>
[quoted text clipped - 5 lines]
>
> Any pointers would be greatly appreciated. TIA
Alan Silver - 03 Mar 2008 15:56 GMT
>Here is an article I did a while back that covers most of the basics:
>http://www.eggheadcafe.com/articles/20060918.asp
>Hope it helps.

That's eggsellent! Sorry, for the awful yolk, I mean joke, but I
couldn't resist it ;-)

Anyway, the article was eggsactly what I was looking for. I haven't had
time to digest it fully yet. Will post back if I have any questions.

Thanks again,
Alan

Signature

Alan Silver
(anything added below this line is nothing to do with me)

Mark Rae [MVP] - 03 Mar 2008 17:19 GMT
> That's eggsellent! Sorry, for the awful yolk, I mean joke, but I couldn't
> resist it ;-)

Peter's an all-round good egg... :-)

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Alan Silver - 03 Mar 2008 16:05 GMT
>Hope it helps.

OK, read the article, played with the code, got a question ;-)

Can I send parameters to the method that begins the asynch work? The two
methods BeginAsyncWork1() and BeginAsyncWork2() are almost identical and
could be done with one method if you could pass in a routine.

The reason I ask is that the task I have in mind requires ten web
requests to be made, and it seems poor programming to write ten almost
identical methods. Furthermore, the ten URLs are only fixed at run time
(from an initial web request), so I would have to store them in a
page-wide array, then have the methods pick one URL each.

Any comments? Thanks again,
Alan

Signature

Alan Silver
(anything added below this line is nothing to do with me)

Alan Silver - 05 Mar 2008 23:00 GMT
Any chance you could answer this Peter? Or anyone else for that matter.

Thanks

>>Hope it helps.
>
[quoted text clipped - 13 lines]
>Any comments? Thanks again,
>Alan

Signature

Alan Silver
(anything added below this line is nothing to do with me)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.