491
Chapter 20
Creating Web Sites and Web Pages
by Using Visual Web Developer
and ASP .NET
After completing this chapter, you will be able to:
n Start Visual Web Developer and create a new Web site.
n Use Visual Web Developer tools and windows, including the Web Page Designer.
n Use the Visual Web Developer Toolbox to add server controls to Web pages.
n Add text, formatting effects, and Visual Basic code to a Web page that calculates loan
payments for a car loan.
n Create a Web page that displays Help information.
n Use the HyperLink control to link one Web page to another on a Web site.
n Use the GridView control to display a table of database information on a Web page.
n Set the Title for a Web page and edit the master page.
In this chapter, you’ll learn how to build Web sites and Web pages by using the Visual Web
Developer tool included with Microsoft Visual Studio 2010. Visual Web Developer has the
look and feel of the Visual Studio Integrated Development Environment (IDE), but it is
customized for Web programming and Microsoft ASP .NET 4, the Microsoft .NET Framework
component designed to provide state-of-the-art Internet functionality. Although a complete
description of Web programming and ASP .NET isn’t possible here, there’s enough in common
between Web programming and Windows programming to allow you to do some useful
experimentation—even if you have little or no experience with Hypertext Markup Language
(HTML). Invest a few hours in this chapter, and you’ll see how quickly you can build a Web
site that calculates loan payments for car loans, create a Web page with Help information,
and display loan prospects from a Microsoft Access database by using the GridView control.
Inside ASP.NET
ASP .NET 4, Microsoft’s Web development platform, has been enhanced in this release.
Some of the improvements include how Web pages are created in the Web Page Designer;
various feature enhancements to ASP .NET Web pages and ASP .NET MVC; support for
recently introduced browsers and handheld devices; a new ASP .NET Chart server control;
enhancements to the FormView, ListView, and QueryExtender controls; new dynamic data
Table of Contents
Creating Web Sites and Web Pages by Using Visual Web Developer and ASP.
NET............................................... 491
Inside ASP .NET..................................................... 491
Web Pages vs. Windows Forms.................................. 493
Server Controls................................................ 493
HTML Controls................................................ 494
Building a Web Site by Using Visual
Web Developer..................................................... 495
Considering Software Requirements
for ASP .NET Programming...................................... 495
Using the Web Page Designer........................................ 498
Adding Server Controls to a Web Site................................. 501
Writing Event Procedures for Web Page Controls.................. 504
Customizing the Web Site Template................................... 509
Displaying Database Records on a Web Page........................... 512
One Step Further: Setting Web Site Titles
in Internet Explorer................................................. 519
Chapter 20 Quick Reference.......................................... 522