Summary


In this chapter you looked at several more advanced techniques for creating ASP.NET pages and Web sites, and saw these techniques in action in a demonstration Web site called PCSDemoSite.

First, you looked at how you can create reusable ASP.NET server controls by using C#. You have seen how to create simple user controls from existing ASP.NET pages, as well as how to create custom controls from scratch. You also saw how the meeting room booker sample from the previous chapter can be reformatted as a user control.

Next you looked at master pages, and how you can provide a template for the pages of your Web site, which is another way to reuse code and simplify development. In PCSDemoSite, in the downloadable code for this chapter, you saw a master page that included navigation Web server controls to enable users to move around the site. The PCSDemoSite sample also laid the framework for themes, which are an excellent way to separate functionality from design and can be a powerful accessibility technique.

You also took a brief look at security and saw how you can implement forms-based authentication on your Web sites with the minimum of effort.

Finally, you investigated Web Parts and saw how to use the Web Parts server controls to put together a basic application that illustrated some of the possibilities that this technology offers.

You have only scratched the surface of what is possible in ASP.NET 2.0. For example, you can do a whole lot more with custom controls. It would have been interesting to discuss templates and data-binding, and how to create controls with this in mind. However, with the information in this chapter, you should be able to start building (and experimenting with) your own custom controls, as well as all the other techniques discussed. For more details on ASP.NET, check out Professional ASP.NET 1.1 (Wiley Publishing, Inc., ISBN: 0-7645-5890-0).




Professional C# 2005 with .NET 3.0
Professional C# 2005 with .NET 3.0
ISBN: 470124725
EAN: N/A
Year: 2007
Pages: 427

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net