2.2. Working with Files in Your Web Site

An ASP.NET 3.5 web site consists of at least a single Web Form (a file with an .aspx extension), but usually it consists of a larger number of files. Many different file types are available in VWD, each offering a distinct functionality. In the next section, you'll see the most important file types that are used in VWD. In addition, you'll learn a few different ways to add these files to your site.

2.2.1. The Many File Types of an ASP.NET 3.5 Web Site

To give you an idea of how many different files you can use in ASP.NET, Figure 2-6 shows the dialog box that allows you to add new files to the site (accessible by right-clicking your web site in the Solution Explorer and choosing Add New Item or by choosing Website Add New Item from the main menu).

Figure 2-6. Figure 2-6

These files can be grouped in a few different categories. The most important files — the ones you'll use throughout the examples in this book — are discussed next.

2.2.1.1. Web Files

Web files are specific to web applications and can either be requested by a browser directly, or are used to build up part of the web page that is requested in the browser. The following table lists the various web files and their extensions, and describes how each file is used.

File Type

Get Beginning ASP.NET 3.5: In C# and VB 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.