Section 18.3. Server-Side Code

   

18.3 Server-Side Code

The output shown in Figure 18-13 is nearly identical to what you saw in the Windows application (Figure 18-10), and in fact the code is also nearly identical.

The actual processing, however, is very different. When you click a button in a Windows application, the event is handled right there, in your code, on the desktop. With a web application, when you click the "Change!" button, the page is submitted to the host, the event is handled on the host, and the new page (with the new text) is sent back to the browser. All of this is done automatically for you by the ASP.NET Framework.

If you start the application again, and select the Source item from the View menu, you'll see that what is actually sent to the browser is just HTML, as shown in Figure 18-14.

Figure 18-14. Examining the source
figs/lvbn_1814.gif

All of the code is run on the server; the browser need not have any special functionality. In fact the browser need not even be running on Windows or .NET!

   


Learning Visual Basic. NET
Learning Visual Basic .Net
ISBN: 0596003862
EAN: 2147483647
Year: 2002
Pages: 153
Authors: Jesse Liberty

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