Flylib.com

Books Software

 
 
 

Essential ASP.NET with Examples in Visual Basic .NET - page 10


Preface

It was late at night in Torrance, California, in August 2000. I had spent 12 hours of the day teaching DevelopMentor's Guerrilla COM course with Mike Woodring and Jason Whittington. Don Box had come over after class, and, as usual, we were staying up late into the night after the students had long since gone to bed, discussing technology and hacking. Microsoft had just released its preview version of .NET at the PDC in July, and we had been spending much of the year up to that point digging into "the next COM" and were excited that it had finally been released so we could talk about it. It was that evening that Don, in his typical succinct way, showed me my first glimpse of ASP.NET (then called ASP+). He first typed into emacs an .aspx file that looked like this:

<%@ Page Language="C#" src="TestPage.cs"
   Inherits="TestPage" %>

<html>
<h1 runat=server id=ctl/>
</html>

He then wrote another file that looked like this:

using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;

public class TestPage : Page
{
  protected HtmlGenericControl ctl;
  void Page_Load(object src, EventArgs e)
  {
    ctl.InnerText = "Hello!";
  }
}

He then placed the two files in c:\inetpub\ wwwroot on his machine and showed me the rendering of the .aspx page through the browser, exclaiming, "Get it?" Perhaps it was the late hour or the fact that I had been teaching all day, but I have to admit that although I "got" the technical details of what Don was showing me, I was somewhat underwhelmed by being able to change the innerText of an h1 element from a class.

The following week, after a couple of good nights of sleep, I revisited the .aspx example and began to explore ASP.NET in more detail. After a day of reading and experimenting, I finally "got it" and I was hooked. This technology was poised to fundamentally change the way people built Web applications on Windows, and it took full advantage of the new .NET runtime. I spent the next six months researching , building ASP.NET applications, and writing DevelopMentor's Essential ASP.NET course, and I spent the subsequent year and a half teaching, speaking, and writing about ASP.NET. This book is the culmination of those activities, and I hope it helps you in your path to understanding ASP.NET.


C# versus VB.NET

Before .NET, Visual Basic was not just another language ”it was a platform unto itself. Building applications in Visual Basic 6.0, for example, was completely different from using C++ and MFC. With .NET, this distinction is gone, and Visual Basic is indeed just another .NET language that uses the same libraries, the same development tools, and the same runtime as all others. As a consequence, we can now talk about technologies like ASP.NET from a language-neutral standpoint. The code samples, however, must be shown in a particular language, so this book is published in two versions: one with examples in C# and one with examples in VB.NET. All content outside the examples is nearly identical between the two books.


Sample Code, Web Site, Feedback

All the code samples in this book are drawn from working samples available for display and download from the book's Web site at http://www.develop.com/books/essentialasp.net/. This site also contains any errata found after publication and a supplemental set of more extended examples of the concepts presented in this book for your reference. The author welcomes your comments, errata, and feedback via the forms available on the Web site.