Send As SMS

Monday, February 27, 2006

Combining WebParts and Master pages [Coding]

Why you need this?


Let's review benefits for Master Pages:
- all pages have similar layout.
- ability to change skin of site
WebParts could bring us:
- Customization of control properties
- Drag&Drop, Minimization, Layout changes, removing of unwanted blocks by user
- Exporting of Web Parts to email or something
Both set of features are pretty desireable to most applications. Is it possible to combine it corectly?

YES - we can use Masterpages and Web parts

  1. Create Masterpage
  2. Add Web Part Manager to it
  3. Define layout of page using Tables
  4. Insert WebPartZone controls into each cell respectively. Each of them could have separate settings. For example, u can allow users to edit some webparts, and move another, and some of areas will be fixed. Also u can change all properties from code later, according to user roles.
  5. Each WebPage have WebParts which is inserted in it by default. This is called PageCatalog. We want to predefine PageCatalog for each of our Detailed page in WebZone1.
  6. Put in ZoneTemplate
  7. Create Detailed page
  8. U can add web parts, user controls, or server controls to WebZone, which has ContentPlaceholder.


Applies to all dotnet languages: C#, VB.NET, C++.NET, J#

0 Comments:

Post a Comment

<< Home