Datasheet

7. Between the opening and closing <div> tags in the page, type the highlighted text and code:
<div>
<h1>Hello World</h1>
<p>Welcome to Beginning ASP.NET 3.5 on <%= DateTime.Now.ToString() %></p>
</div>
You’ll see code formatted like this a lot more in this book. When you are instructed to
type in code formatted like this with mixed background colors, you only need to type
in the highlighted code. The other code should already be present in the file.
When you see code like this in a discussion — for example, in a How it Works section —
the highlighted code is the part you need to focus on, while the code with no background
is less important.
Don’t worry about the code with the angle brackets (
<>) in the welcome message; you’ll
see how it works later in this book. Although this code may not look familiar to you now,
you can probably guess what it does: it writes out today’s date and time.
8. From the Debug menu in VWD, choose Start Without Debugging (or press Ctrl+F5) to open the
page in your default browser, as shown in Figure 1-5.
Figure 1-5
If you don’t see the date and time in the page, or if you get an error, look again at the code in
the welcome message. It starts with an angle bracket (
<) followed by a percentage symbol and
an equals sign. It closes with a single percentage sign and another angle bracket (
>). Also, make
sure you typed in the code exactly as shown here, including capitalization. This is especially
true when you are using C#, as that language is case sensitive.
If you get an Information bar warning about Intranet settings in Internet Explorer, click the bar and choose
Enable Intranet Settings. If you want to learn more about the implications of these settings first, choose
What are Intranet Settings from the popup menu.
9. Notice how a little icon with a screen tip appeared in the tray bar of Windows, visible in Figure 1-6.
This icon belongs to the ASP.NET Development Server. This web server has been started by VWD
automatically to serve the request for your page. You’ll learn more about how the web server is able
to process your page later in this book.
7
Chapter 1: Getting Started with ASP.NET 3.5
87593c01.qxd:WroxPro 1/25/08 9:05 AM Page 7