Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

At this moment I have a custom web part property which can hold some custom information.

[Browsable(false), Category("Settings"), DefaultValue(""), WebPartStorage(Storage.Shared), FriendlyName("Configuration")] 
    public String CustomProperty { get; set; }

In order to support the export functionality of web parts for this property, I need to add the PersonalizableAttribute (reference).

[PersonalizableAttribute(PersonalizationScope.Shared), Browsable(false), Category("Settings"), DefaultValue(""), WebPartStorage(Storage.Shared), FriendlyName("Configuration")] 
    public String CustomProperty { get; set; }

By adding the first attribute, it is possible to export this property with its information. However the information that my CustomProperty holds, is not transferred because I think ASP.net stores the somewhere else (reference).

Is there a way to support export of a web part without losing information stored in the my custom property (because I add the Personalizable Attribute)?

share|improve this question
    
If you are using sharepoint 2010 or higher, it's better to use asp.net namespace with new attributes. For example WebBrowsable(true),WebDisplayName("display name"),WebDescription("description"),Category("Custom settings"),Personalizable(PersonalizationScope.Shared). I am not sure if it resolve your issue, but you can try. Custom properties definitely can be exported using above technique. –  Kai Aug 1 '13 at 12:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.