Todd Bleeker's 12 Hive

All MindsharpBlogs

Are you pondering what I'm pondering?

My Links

Post Categories

Archives

Blog Stats

Export Web Part as a DWP

In a previous post, I explained how to import a Windows SharePoint Services (WSS) Dashboard Web Part (DWP) directly onto your Web Part Page, import a DWP into the Site Gallery, or copy a DWP into the Virtual Server Gallery on the Web Servers. But I neglected to explain how to export a Web Part to a DWP file.

Choose a Web Part that you would like to export (I just dropped an empty Content Editor Web Part onto the page) and choose Export... from it's smart menu:

Choose the Save button from the File Download dialog:

I like to strip out the spaces in the file name and save all my DWPs in a directory called DWP directly off the root of my c: drive:

Make no mistake, the Web Part's assembly is not included in this export, just a reference to the Web Part's assembly, the named value pairs associated with the 21 built-in properties, and any custom public properties that the Web Part's class has exposed. If you look at the saved DWP file in Notepad, you will see that it simply references the assembly, namespace, and class of the Web Part that is installed on your server and optionally assigns initial values to properties that will be populated when the Web Part is once again placed on a Web Part Page:

This exported DWP can be imported back into a gallery or a page as it is or the XML can be modified so that different default values are used when the Web Part is placed onto a Web Part Page.

<Todd />

posted on Tuesday, October 25, 2005 7:05 AM

Feedback

# Hide the Quick Launch Bar 10/26/2005 8:31 AM Todd Bleeker's 60 Hive

# Guidelines to Centralize SharePoint Style/Script Customizations 3/10/2006 4:25 PM Todd Bleeker's 60 Hive

# Guidelines to Centralize SharePoint Style/Script Customizations 3/10/2006 4:30 PM Todd Bleeker's 60 Hive

# re: Export Web Part as a DWP 10/12/2006 1:14 AM Roxana Goidaci

The export option is not available for me in Sharepoint Server 2007. Any idea how to export a webpart in this case?

# re: Export Web Part as a DWP 4/30/2007 9:11 AM laurie.wheeler@stoneridge.com

What do you do if "export" isn't showing up under the smart menu to be able to export the web parts.

# re: Export Web Part as a DWP 7/13/2007 10:36 AM Kelly

I'm trying to migrate from SharePoint WSS 2.0 to SharePoint WSS 3.0 and I cannot export and import my Surveys. Any ideas on how this could be done?

Thanks.

# re: Export Web Part as a DWP 7/16/2007 3:42 AM Chris

If the export option doesn't appear in the smart menu. edit the page in designer and select the web part you want to export and find the following code.
<ExportControlledProperties>false</ExportControlledProperties>

simply change that to true and you will now be able to export the web part.

Not sure why it defaults but this is one work around I have found hope it helps.

# re: Export Web Part as a DWP 7/16/2007 4:01 AM Chris

However you should note that even doing this will not work for all web parts as some cannot be imported.

# Importing / Exporting Custom XSLT Web Parts MOSS 2007 | keyongtech 1/22/2009 2:36 AM Pingback/TrackBack

Importing / Exporting Custom XSLT Web Parts MOSS 2007 | keyongtech


Comments on this post are closed.
Title  
Name  
Url
CAPTCHA
Protected by Clearscreen.SharpHIPEnter the code you see:
Comments