Sams Teach Yourself ASP.NET in 21 Days, Second Edition
By Chris Payne
Table of Contents
Day 2.  Building ASP.NET Pages

Today's lesson taught you a lot about the ASP.NET framework. Although it may seem like overkill at the moment, you'll appreciate this information when you develop more complex ASP.NET applications.

ASP.NET processes events and code on the server. The browser only sees HTML, which means that clients don't need any additional applications or downloads. This is an important aspect of ASP.NET it converts all code to HTML before sending it to the client.

The runat="server" attribute provides a lot of functionality for ASP.NET pages, allowing components to link to the server and maintain viewstate. This attribute is vital to ASP.NET pages.

ASP.NET code is separated from HTML by using <script></script> and <%%> tags. Most code should be placed within the former tags because these sections are compiled and eliminate the "spaghetti code" problem.

Comments are delimited by one of three sets of tags: <!----> for HTML comments, ' for VB comments, and <%----%> for server-side comments. These comments are usually used to provide helpful explanations of the code, and they don't affect its execution at all.

Use the code continuation character (_) to break up long statements into multiple lines in VB.NET. When you use this character within a string, don't forget to close the string first and add an ampersand.

The .NET Framework and the CLR introduce a lot of new concepts for ASP.NET applications, including application domains (the new way of providing application boundaries), assemblies, and namespaces. ASP.NET is an integral part of the .NET Framework, and each page that you create extends this framework.

Finally, ASP.NET allows you to use compiled languages such as VB, C++, and C#. Interpreted languages such as VBScript are no longer supported.

In the next two days, you'll examine how to program ASP.NET pages. Today you learned what ASP.NET pages look like and how their different parts work, but now it's time to learn how to build code that handles these pages. Day 3 will focus on programming techniques with VB.NET and C#, and Day 4 will focus on C#. These are the two most common programming languages for use with ASP.NET.

See you tomorrow!


    Sams Teach Yourself ASP. NET in 21 Days
    Sams Teach Yourself ASP.NET in 21 Days (2nd Edition)
    ISBN: 0672324458
    EAN: 2147483647
    Year: 2003
    Pages: 307
    Authors: Chris Payne

    Similar book on Amazon © 2008-2017.
    If you may any questions please contact us: