Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is it possible to hide it? I'm developing a webpart for a special page and it shouldn't be possible to place it somewhere else.

share|improve this question

1 Answer 1

up vote 6 down vote accepted

To "hide" it from the WP gallery you just leave out provisioning the Web Part Control Description file (.webpart) (in VS2010 - just remove the .webpart file).

You will still be able to add your Web Part in server side code or by directly adding it in the WebPartZone in the page (via a feature that deploys the page or using SPD customizations).

PS: To stop people from exporting it make sure that you override the Export property and always return that it's not exportable

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.