I have a sharepoint webpart that uses some webpart properties (string in this case). The properties all work as I would like however say I make a change to our webpart and deploy to the server, the existing properties are lost.
After breif reading I believe it may be related to my property definition:
public static string Exclusions;
[Category("Extended Settings"),
Personalizable(PersonalizationScope.Shared),
WebBrowsable(true),
WebDisplayName("Library Exclusions"),
WebDescription("Enter any Libraries to exclude. Use '|' to separate.")]
public string _Exclusions
{
get { return Exclusions; }
set
{ Exclusions = value;}
}
I am wondering if I should remove the "static" from here. However when I go to do so I can no longer use this property as I have been:
protected override void OnPreRender(EventArgs e)
{
((HiddenField)this.FindControl("DocumentLibraryListingHiddenWebPartProperties")).Value = DocumentLibraryListing.DocumentLibraryListing.Exclusions;
}
Any suggestions on what to do here?