Prev | Current Page 576 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"

Next, we added WebPartZone and ZoneTemplate controls to contain the two web
parts. A required step is to add a WebPartManager control to the page to enable web part functionality.
Figure 10-2 shows the results of this minimalist effort.
454 CHAPTER 10 ?–  OTHER SERVER CONTROLS
Figure 10-2. The Customer Info web part basic web form in the browser
The web form renders with the additional chrome of the web parts around the controls,
including the basic web part menu containing just the Minimize and Close commands, but this
version of the web page is not much different from the server control version. We next discuss
how to enable different web part modes, such as design.
CHAPTER 10 ?–  OTHER S ERVER C ONTROLS 455
The WebPartPageController Server Control
Part of the allure of web forms with web parts is the ability to provide to end users design-time
functionality normally in the hands of developers. The WebPartPageController server control
provides a menu to do this by plugging into the web part page functionality. One example
behavior is the ability to move the location of web parts by entering design mode for the page.
Once finished designing the page, the end user can choose browse mode in the drop-down
menu. The WebPartPageController control also allows the user to choose whether to save
personalization data at the User or Shared scope.


Pages:
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588