SharePoint 2010 ECM Code Sample: Document Sets Ribbon and Export
Use this SharePoint 2010 code sample to add a custom button to the document sets ribbon and add functionality to it, and learn how to export document sets for download as a ZIP file.
Last modified: April 20, 2011
Applies to: SharePoint Server 2010
The Document Sets Ribbon and Export code sample in the DocumentSetRibbonAndExport.zip file is located in the path C:\Program Files\Microsoft SDKs\SharePoint 2010\Samples folder. The sample shows how to add a new custom button to the Manage tab of the document sets ribbon, how to add functionality to the button, and how to export document sets so that they can be downloaded as a single ZIP file.
Download the SharePoint 2010 sample code described in this topic from Code Gallery.
Test this project on your development or test site.
Building the Sample
In Microsoft Visual Studio 2010, open the *.sln file.
On the Properties pane, change the Site URL value to be the absolute address of your development test site. For example, http://MyDevServer/. Ensure that you include the closing forward slash.
Running the Sample
Before you run this sample, set it up for deployment by building the project, adding the assembly to the global assembly cache (GAC), modifying the web.config file, copying image files, and installing and activating features.
To deploy the sample
Build the DocsetRibbonDelegate project.
Add the DocsetRibbonDelegate DLL file to the global assembly cache.
Add the control to the safecontrols list in the application web.config file.
Copy both features (addzipribbon and addzipdelegate) to the layouts\features folder.
Copy both image files (zipfile16x and zipfile32x) to the layouts\images folder.
Install and activate both features.
stsadm -o installfeature -filename addzipribbon\feature.xml
stsadm -o activatefeature -filename addzipribbon\feature.xml -url http://localhost
stsadm -o installfeature -filename addzipdelegate\feature.xml
stsadm -o activatefeature -filename addzipdelegate\feature.xml -url http://localhost