Today I needed to enable the export option on a custom web part.

To do this I went through the following steps:

  1. Opened SharePoint Designer
  2. Opened the site that contained the web part
  3. Detached the layout and opened the page that shows the web part.
  4. Clicked on the web part in the design mode and found the corresponding code.
  5. Added ExportMode=”All” so that the web part looked like this:

<aspSample:CustomWebPart id=”MyWebPart” runat=”server” ExportMode=”All” />

Quite easy after all.