I want to allow a user to store personal information in my WebPart.
So I have a property:
[WebBrowsable(true)]
[WebDisplayName("Tag")]
[Pages.SPWebCategoryName("Tag to display")]
[Pages.WebPartStorage(Pages.Storage.Personal)]
[WebDescription("You would put the description here.")]
[Personalizable(PersonalizationScope.User)]
public string Tag { get; set; }
The customer wants to update the Tag property in the SharePoint WebPart directly on "OK" button click!
protected void OnButtonClick(...)
{
var text = tb.Text;
this.WebPart.Tag = text;
// How to store?
}
How do I save the information for a specific user?