O'Reilly logo

Professional C# 2008 by Karli Watson, Morgan Skinner, Jay Glynn, Bill Evjen, Christian Nagel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 38

ASP.NET Development

Sometimes the tools available for Web development, however powerful, don’t quite match up with your requirements for a specific project. Perhaps a given control doesn’t quite work as you would like it to, or perhaps one section of code, intended for reuse on several pages, is too complex in the hands of multiple developers. In such cases, there is a strong argument for building your own controls. Such controls can, at their simplest, wrap multiple existing controls together, perhaps with additional properties specifying layout. They can also be completely unlike any existing control. Using a control you have built yourself can be as simple as using any other control in ASP.NET (if you have written it well), which can certainly ease Web site coding.

In the first part of this chapter, you examine the options available to control developers, and assemble some simple user controls of your own. You also look at the basics of more advanced control construction, although you won’t see these in any great depth; whole books are devoted to the subject.

Next, you look at master pages, a technique new to ASP.NET 2.0 that enables you to provide templates for your Web sites. Using master pages, you can implement complex layouts on Web pages throughout a Web site with a great deal of code reuse. You also see how you can use the navigation Web server controls in combination with a master page to provide consistent navigation across a Web site.

Site navigation can ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required