Introduction

In previous chapters, we used Windows Forms and Windows controls to develop Windows applications. In this chapter, we introduce Web application development with Microsoft's ASP.NET 2.0 technology. Web-based applications create Web content for Web browser clients. This Web content includes Extensible HyperText Markup Language (XHTML), client-side scripting, images and binary data. Readers not familiar with XHTML should first read Appendix F, Introduction to XHTML: Part 1, and Appendix G, Introduction to XHTML: Part 2, before studying this chapter.

We present several examples that demonstrate Web application development using Web Forms, Web controls (also called ASP.NET server controls) and C# programming. Web Form files have the filename extension .aspx and contain the Web page's GUI. You customize Web Forms by adding Web controls including labels, text boxes, images, buttons and other GUI components. The Web Form file represents the Web page that is sent to the client browser. From this point onward, we refer to Web Form files as ASPX files.

Every ASPX file created in Visual Studio has a corresponding class written in a .NET language, such as C#. This class contains event handlers, initialization code, utility methods and other supporting code. The file that contains this class is called the code-behind file and provides the ASPX file's programmatic implementation.

To develop the code and GUIs in this chapter, we used Microsoft Visual Web Developer 2005 Expressan IDE designed for developing ASP.NET Web applications. Visual Web Developer and Visual C# 2005 Express share many common features and visual programming tools that simplify building complex applications, such as those that access a database (presented in Sections 21.7 and 21.8). The full version of Visual Studio 2005 includes the functionality of Visual Web Developer, so the instructions we present for Visual Web Developer also apply to Visual Studio 2005. Note that you must install either Visual Web Developer 2005 Express (available from msdn.microsoft.com/vstudio/express/vwd/default.aspx) or a complete version of Visual Studio 2005 to implement the programs in this chapter and Chapter 22, Web Services. The site www.deitel.com/books/csharphtp2/ provides instructions for running the ASP.NET 2.0 examples presented in this chapter if you do not wish to recreate them.

Категории