10

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.

6

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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