11.4. Summary

This chapter focused on building the dashboard for the Paid Time Off application. As shown in the chapter, the bulk of the functionality for creating a customizable screen that gives user a peek at important system information is handled by the web part controls that are included with Visual Studio. As the developer, you simply have to determine what information you want to display and in what format. This is a slam dunk for you, and you should be able to get a lot of mileage out of the web parts' functionality.

The steps required to create a page with customizable web parts are as follows:

  • Add a Web Form to your project and add a WebPartManager control to the page.

  • Create an HTML table or DIV tags to determine the positioning of the controls on the screen.

  • Add a CatalogZone control and then add a PageCatalogPart control to the Catalog Zone.

  • Add a button that enables users to customize the page and a button that enables users to reset the page to the default view.

  • Add code to the button click events to customize the page or reset the page.

  • The code to customize a page is WebPartManager1.DisplayMode = WebPartManager.CatalogDisplayMode;

  • The code to reset a page is WebPartManager1.Personalization.ResetPersonalizationState();

  • Add WebPartZone controls to the page where you would like to add the web parts.

  • Use standard controls or create your own user or server controls and add them to the WebPartZone controls. The formatted properties of the WebPartZone control determine the ...

Get ASP.NET 3.5 Enterprise Application Development with Visual Studio® 2008: Problem - Design - Solution now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.