Home All Groups Group Topic Archive Search About

How do I restrict webpart usage to a single instance on a page?

Author
27 Sep 2006 6:11 PM
AHarwood
I need a way to restrict users from placing multiple instances or copies of a
webpart on the same page.  How do I do this?

Author
28 Sep 2006 1:25 AM
Gaurav Vaish (www.EduJiniOnline.com)
>I need a way to restrict users from placing multiple instances or copies of
>a
> webpart on the same page.  How do I do this?

You will need to check yourself.
When added to page, talk to WebPartManager to look for all WebParts on the
page. Check if there are more than one WebParts of your type (GetType())...
if so, report an error in your display.

You may also want to add design time support.