Conclusion: Web Parts

In this tutorial, we took a brief look at Web Parts from an ASP.NET point of view. Web Parts are like server-side controls on steroids. They provide layout and control management above and beyond normal server-side controls. The Web Part architecture is built around three fundamental concepts: WebPart zones, Web Parts themselves, and the server-side controls that may populate them. Web Parts are especially useful for portal-type applications because of their ability to leverage the personalization and customization facilities of ASP.NET 2.0.

Tutorial 7 Quick Reference

How to enable a Web page to use WebPart controls

Add a WebPartManager to the page on which you wish to use WebPart controls

How to add various editing capabilities to a Web Parts page

Add an EditorZone to the page

How to add a place in which to position server-side controls to be managed by the Web Part architecture

Add a WebZone to the page

How to allow users to dynamically add controls from a collection of controls

  1. Add CatalogZone to the page

  2. Add controls to the catalog while in Edit Template mode

How to create a Web Part

  1. Derive a class from System.Web.UI.WebControls.WebParts.WebPart

  2. Render some HTML OR Create child controls