The Location Drop-down
Wondering whats implied by setting Location to File System? Earlier, we
mentioned that Visual Web Developer contains a built-in web server. When
youre working with a web site project thats saved to the file system, Visual
Web Developers web server is used to execute the project.
You can create a new web project in IIS by changing the Location to HTTP.
In that case, youd need to specify an HTTP location, such as http://loc-
alhost/Dorknozzle. If you did so, Visual Web Developer would create a
new folder named Dorknozzle in the web servers root directory. Well take
a look at IIS (or Cassini) a bit later.
Meeting the Features
Once you click OK, your project will be created, along with a few default files,
and youll be presented with the first page of your project. It should look some-
thing like the one shown in Figure 5.4.
Figure 5.4. Your new Dorknozzle web application
148
Chapter 5: Building Web Applications
Dont be daunted by the many forms and windows around your screeneach
has something to offer! Visual Web Developer is very flexible, so you can resize,
relocate, or regroup the interface elements that appear. Well spend the next few
pages taking a brief tour of these windows, though well discover even more as
we progress through the chapters of this book.
The Solution Explorer
The Solution Explorer, which by default is located in the upper right-hand part
of the Visual Web Developer window, provides the main view of your project,
and displays the files of which your project is composed. As Figure 5.5 shows,
the root node is the location of your project; beneath the root node you can see
that Visual Web Developer has already created other elements for you.
Figure 5.5. The Solution Explorer
The files that are created for you will differ depending on the type of project
youre working on, and the language youve chosen. If youre using C#,
Web.config wont appear in your list. Dont worrywell create this file later.
Lets review the functions of the three child nodes shown in Figure 5.5:
App_Data is a special folder that ASP.NET uses to store database files. Youll
learn more about this folder in Chapter 13.
Default.aspx is the default web form that Visual Web Developer creates for
you. If you look closely, youll see that you can expand the Default.aspx
node by clicking the + sign to its left. If you expand the node, youll find a
code-behind file named Default.aspx.vb, or Default.aspx.cs, depending
on the language you selected when you started the project. Visual Web Deve-
loper can work with web forms that use a code-behind file, as well as with
those that dont.
149
Meeting the Features

Get Build Your Own ASP.NET 2.0 Web Site Using C# & VB, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.