18.3 Server-Side CodeThe 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 sourceAll 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! |