ASP.NET 2 Web Parts: Adding multiple instances of a part to a web zone

Yet another long-overdue response to a question I was asked about ASP.NET 2 while on the road: can you allow visitors to your web page to customize a portal site by adding an arbitrary number of instances of a Web Part to a Web Part Zone?

Once again, the answer is an emphatic "yes you can, and you only have to use declarative code!"

The trick is the DeclarativeCatalogPart element, as demonstrated at this link

(One caveat: The AutoComplete on my Beta 1 version of Visual Studio Web Developer Express was having some trouble with the DeclarativeCatalogPart element, so you may have to do some faith-based coding... but I did manage to modify Olive's default.aspx page and make this work without a hitch using the Beta 1 bits.)



Comments (0)

Skip to main content