Question

How can I save the configuration of a web part for a certain web part page in SharePoint?

Was it helpful?

Solution

From the UI you can export the web part. Edit the page, click the drop-down on the web part, and select Export. This allows you to save the web part's XML configuration so it can be uploaded elsewhere.

You can also programmatically export the web part using the SPLimitedWebPartManager.ExportWebPart() method.

For those web parts that do not allow an export, enumerate the web part properties programmatically. Here is a complete list of all web part members.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top