Web Parts
Web Parts allow your users to reconfigure sections of your site to meet their own needs and preferences. Many information providers allow the user to pick which content they want displayed and in which column to display it. Web Parts allow you to provide that functionality with drag-and-drop "parts" of your page.
Create a New Site
To learn about Web Parts
, create a new web site (call it WebParts
) and copy the SitePersonalization
web site from the beginning of this chapter (not the Themes
web site you just completed).
Set the Welcome page as the start page and make sure you can log in with an account you created previously (or, alternatively, set CreateAccount
as the start page and create a new account to work with).
Web Parts Architecture
Web Parts are created and managed on top of personalization using the WebPartManager
control to manage the interaction of Web Parts, and normal ASP UI Controls to create the user-managed interface.
Creating Zones
A page that uses Web Parts is divided into zones : areas of the page that can contain content and controls that derive from the Part class (Part controls). They can also contain consistent UI elements (header and footer styles, border styles, etc.) known as the chrome of the control.
It is typical (though certainly not required) to organize these zones using tables.
To see a simple example of Web Parts at work, follow these steps:
Create a new page called WebPartsDemo.aspx.
Open the WebParts section of your Toolbox, and drag a
WebPartManager ...
Get Programming Visual Basic 2005 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.