Latest Web News

Will Vista prices be on a par with XP’s everywhere?
Even though the Windows Vista versions don’t match up exactly, feature for feature, with the comparable XP ones, Microsoft has held retail pricing fairly constant, officials have said. (And ditto for volume-license pricing, according to the Softies.) Outside the U.S., however, it seems customers are going to be charged quite a bit more for Vista than XP, according to early data from ...

Telstra steals 3G show from rivals
Telstra's blitzkrieg national rollout of a high-speed 3G network has undercut the chances of any competing network using WiMAX or other wireless broadband technology for mobile data applications, according to analyst group Gartner. By offering broad coverage and usable data speeds, Telstra's Next G has "pretty much taken the wind out of the sails of any alternative technology looking to target mobile users...

Passport hacker warns of identity risk
A professional hacker who claims to have found a way to steal the personal information contained in the new Australian ePassport says he's working on a way to do it from a distance. Briton Adam Laurie said his reader and software program are capable of accessing the data stored on the passport's computer chip, even through coat pockets, as long as the coat is within a few inches...

Newspaper criticised over 'racist' blog
An Australian newspaper has been accused of encouraging racism by printing dozens of racist comments on its website. Readers of the The Daily Telegraph were invited to discuss a recent story involving a teacher who called a Lebanese-Australian student a terrorist. The newspaper said the incident happened during an argument at a school in southern Sydney. The teacher was reprimanded and ordered to attend a cultural sensitivity course.


12.12.06


ASP.NET 2.0: Asynchronous Pages

By Mads Kristensen

In ASP.NET 2.0 it is now possible to create asynchronous pages in a very simple and easy way.

It gives you a whole new abstraction layer on top of the managed thread pool that let's any webpage take advantage of multithreading.

On high volume websites it means much higher performance. The single coolest thing about it is that you build the web pages as you normally would, but move some of the code into two separate methods.

That means that there is no real learning curve, because of the simplicity.

The only thing needed to make is the use of classes that have asynchronous methods.

It could be calling web services, doing database queries, creating a web request or many other things. In this example I've chosen a web request because it is the simplest to demo.

The page makes an asynchronous request to a website and writes the HTTP status code to the response stream.

First of all, we have to tell the page that is has to work in asynchronous mode. We do that by adding the Async="true" attribute to the page declaration.



Web Content Mirroring and IIS6 Metabase Replication Software
Click here for a free product evaluation kit.

Then we just have to add two methods and register them in the Page_Load event handler.



As you can see from the example, only very few extra lines of code is needed to make the page render asynchronously.

Even though they are far from alike, it reminds me of the BackgroundWorker in Windows Forms.

About the Author:
Mads Kristensen currently works as a Senior Developer at Traceworks located in Copenhagen, Denmark. Mads graduated from Copenhagen Technical Academy with a multimedia degree in 2003, but has been a professional developer since 2000. His main focus is on ASP.NET but is responsible for Winforms, Windows- and web services in his daily work as well. A true .NET developer with great passion for the simple solution.

http://www.madskristensen.dk/

About DevWebProAU
DevWebProAU is for professional developers ... those who build and manage applications and sophisticated websites. DevWebProAU delivers via news and expert advice New Strategies In Development.

DevWebProAU is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com NetworkNewz.com



-- DevWebProAU is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2006 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal  

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article


Delivering IT Solutions DevWebProAU News Archives About Us Feedback DevWebProAU Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact