Export (0) Print
Expand All

SharePoint 2010 ECM Code Sample: Document Sets Ribbon and Export

SharePoint 2010

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

  1. In Microsoft Visual Studio 2010, open the *.sln file.

  2. 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

  1. Build the DocsetRibbonDelegate project.

  2. Add the DocsetRibbonDelegate DLL file to the global assembly cache.

  3. Add the control to the safecontrols list in the application web.config file.

    <SafeControl Assembly="DocsetRibbonDelegate, Version=1.0.0.0, Culture=neutral, PublicKeyToken=fd6371d40a0070d2" Namespace="MyRibbonDelegate" TypeName="MyRibbonDelegateClass" />
    
  4. Copy both features (addzipribbon and addzipdelegate) to the layouts\features folder.

  5. Copy both image files (zipfile16x and zipfile32x) to the layouts\images folder.

  6. 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
    
    IISRESET
    

Community Additions

ADD
Show:
© 2014 Microsoft