The companion CD inside this book contains the code samples, written in C#, that you'll use as you perform the exercises in the book. By using the code samples, you won't waste time creating files that aren't relevant to the exercise. The files and the step-by-step instructions in the lessons also let you learn by doing, which is an easy and effective way to acquire and remember new skills.
Follow these steps to install the C# code samples on your computer so that you can use them with the exercises in this book.
Remove the companion CD from the package inside this book and insert it into your CD-ROM drive.
Review the end user license agreement. If you accept the terms, select the accept option and then click Next.
A menu will appear with options related to the book.
Click Install Code Samples.
Follow the instructions that appear.
The code samples will be installed to the following location on your computer: C:\Microsoft Press\ASP.NET 2.0 Step by Step\
The installer will create a virtual directory named aspnet2sbs under the Default Web Site. Below the aspnet2sbs virtual directory, various Web applications are created. To view these settings, open the Internet Information Services console.
Follow these steps to download and install the Visual Basic code samples on your computer so that you use them with the exercises in this book.
Download the Visual Basic code samples installer from the book's online companion content page: http://www.microsoft.com/mspress/products/mell/
Run the installer.
Follow the instructions that appear.
The code samples will be installed to the following location on your computer: C:\Microsoft Press\ASP.NET 2.0 Step by Step\
The installer will create a virtual directory named aspnet2sbs under the Default Web Site. Below the aspnet2sbs virtual directory, various Web applications are created. To view these settings, open the Internet Information Services console.
Each chapter in this book explains when and how to use any code samples for that chapter. When it's time to use a code sample, the book will list the instructions for how to open the files. Many chapters begin projects completely from scratch so you can grok the whole development process. Some examples borrow bits of code from previous examples.
Here's a comprehensive list of the code sample projects.
Project |
Description |
Chapter 1 |
|
HelloWorld.asp, Selectnoform.asp, Selectfeature.htm, Selectfeature2.htm, Selectfeature.asp |
Several Web resources illustrating different examples of raw HTTP requests. |
WebRequestor |
A simple application that issues a raw HTTP Request. |
Chapter 2 |
|
HelloWorld, HelloWorld2, HelloWorld3, HelloWorld4, HelloWorld5, partial1.cs, partial2.cs |
Web resources illustrating ASP.NET's compilation models and partial classes. |
Chapter 3 |
|
BunchOfControls.htm, BunchOfControls.asp, BunchOfControls.aspx |
Web resources illustrating rendering control tags. |
ControlORama |
Visual Studio-based project illustrating Visual Studio and server-side controls. |
Chapter 4 |
|
ControlORama |
Illustrates creating and using rendered server-side controls. |
Chapter 5 |
|
ControlORama |
Illustrates creating and using composite server-side controls and User controls. |
Chapter 6 |
|
ControlPotpourri |
Illustrates control validation, the TreeView, and the MultiView / View controls. |
Chapter 7 |
|
UseWebParts |
Illustrates using Web Parts within a Web application. |
Chapter 8 |
|
MasterPageSite |
Illustrates developing a common look and feel throughout multiple pages within a single Web application using Master Pages, Themes, and Skins. |
Chapter 9 |
|
ConfigORama |
Illustrates configuration within ASP.NET. Shows how to manage the Web.Config file, how to add new configuration elements and how to retrieve those configuration elements. |
Chapter 10 |
|
SecureSite |
Illustrates Forms Authentication and authorization within a Web site. |
Login.aspx, OptionalLogin.aspx, Web.Config, Web.ConfigForceAuthentication, Web.ConfigForOptionalLogin |
Web resources for illustrating Forms Authentication at the very barest level. |
Chapter 11 |
|
DataBindORama |
Illustrates databinding to several different controls, including the GridView. Also illustrates loading and saving datasets as XML and XML schema. |
Chapter 12 |
|
MaketPersonal |
Illustrates the new ASP.NET 2.0 personalization features. |
Chapter 13 |
|
SessionState |
Illustrates using session state within a Web application. |
Chapter 14 |
|
UseDataCaching |
Illustrates caching data to increase performance. |
Chapter 15 |
|
OutputCaching |
Illustrates caching output to increase performance. |
Chapter 16 |
|
DebugORama |
Illustrates debugging and tracing Web applications. |
Chapter 17 |
|
UseApplication |
Illustrates using the global application object and HTTP modules as a rendezvous point for the application. Illustrates storing globally scoped data and handling application-wide events. Includes an equivalent example module in Visual Basic. |
Chapter 18 |
|
CustomHandlers |
Illustrates custom HTTP handlers, both as separate assemblies and as ASHX files. Includes code in C# and Visual Basic. |
Chapter 19 |
|
WebServiceORama |
Illustrates a Web service that serves up random quotes. |
QuoteServiceVB |
Illustrates a Web service using Visual Basic that serves up random quotes. |
Chapter 20 |
|
DeployThis |
Illustrates how to make an installation package to deploy a Web site. |
All these projects are available as complete solutions for the practice exercises (in case you need any inspiration).
Follow these steps to remove the code samples from your computer.
In Control Panel, open Add Or Remove Programs.
From the list of Currently Installed Programs, select Microsoft ASP.NET 2.0 Step by Step.
Click Remove.
Follow the instructions that appear to remove the code samples.