----------------------------------------------------------- New Message on MumbaiUserGroup
----------------------------------------------------------- From: Swapnil_B1 Message 1 in Discussion Asynchronous Web Page Programming Asynchronous programming allows a process to have multiple threads, enabling the process to do more than one action simultaneously. While asynchronous programming can be complicated, it can dramatically improve performance in situations where the process would otherwise need to wait for a relatively slow action, such as accessing a network resource, to occur. If you have done asynchronous programming in Windows Forms applications, you can also use those techniques in ASP.NET Web forms. However, ASP.NET provides a different technique as well. Additionally, because ASP.NET Web pages may have dozens of users simultaneously, the considerations and benefits of asynchronous programming are different. Improving Performance with Asynchronous Web Page Programming In a Windows Forms application, you often use asynchronous programming to allow the application to respond to user input while a long-running process executes. In Web pages, the user cant interact with the page until page rendering is complete, so responding to user input isnt a valid reason for using asynchronous programming. Instead, you should use asynchronous programming to improve the efficiency of long-running Web pages, even if each page only needs to perform one task at a time. In this case, the Web application becomes much more efficient during busy times when multiple pages are requested simultaneously because the thread pool is used more efficiently. For example, if you are creating a Web page that must query a network resource (such as a Web service), IIS and ASP.NET can only render a limited number of pages simultaneously. Therefore, the thread pool can become completely consumed, creating a performance bottleneck. Once the thread pool is consumed, your server waits for pages to finish rendering before beginning to process other pages. Even though the server might have available processor cycles, requests are queued. By enabling asynchronous Web page programming, the server can begin rendering more pages simultaneously, improving efficiency and reducing page rendering time. To enable asynchronous Web page programming, follow these steps: 1. Add the Async="true" attribute to the @ Page directive, as the following example shows: <%@ Page Language="VB" Async="true" AutoEventWireup="false" %> Swapnil (Swaps) http://swapsnet.spaces.live.com/ ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
