Reviewing Round Trips and Postback


In Chapter 1, you learned that each time you click a button in an ASP.NET page, the page is posted back, making a round trip to the server. Now that you have a page to work with, it s worth reviewing those concepts in a live page.

Run your Web Forms page again. Type some text into the TextBox control, and click the Click Me button. Type some other text, and click the button again. Repeat several times. If the status bar is displayed in Internet Explorer, watch the lower right and you ll see that every time you click the button, the progress bar shows up when the browser is loading a page that is, the page is making a round trip each time you click.

If you click the Back button in the browser, you ll find yourself revisiting the pages you just filled in. This illustrates that every page is a separate, brand-new instance. As mentioned, each time the user clicks a button or otherwise causes the page to be posted, the page performs a round trip and runs all over again, from scratch, sending a new page to the browser.

Let s look at one final aspect of how the page runs.




Microsoft ASP. NET Web Matrix Starter Kit
Microsoft ASP.NET Web Matrix Starter Kit (Bpg-Other)
ISBN: 0735618569
EAN: 2147483647
Year: 2003
Pages: 169
Authors: Mike Pope

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net