Since the logic is on the server, all of the maintenance and updates to the processing code can be made on the server rather than trying to make sure that every client anywhere in the world is updated. And one more benefit is that clients - from desktop computers even down to handheld computers the size of cell phones - don't have to do all this processing and can be smaller and cheaper.
To execute controls on the server instead of the client, you can choose from ...
- controls that are standard HTML, but executed on the server
- ASP.NET's new .NET tags
- the (also new) ASP.NET validation server controls
To move a standard HTML tag to the server, you have to change the tag attributes so the server knows that processing is supposed to happen there. To illustrate this idea, let's look at the familiar anchor tag. An example can be seen at the top. Compare the HTML version to the ASP.NET version.
In addition to the Page directive at the top, note that in the anchor tag, the href attribute is gone and an id attribute to give the tag a name to reference in code has been added. The runat attribute has also been added. In this example, the href value is set by VB.NET code in a Page_Load event subroutine that is also run on the server (and is processed before the HTML since it's in a Page_Load event). This VB.NET code could be uploaded to the server separately but it's part of a script here to give you a more complete picture of what's going on.


