Search code examples
sharepointweb-partspersonalization

Add web part programmatically to a Sharepoint Page and save values into the web part personalization store


In my project I programmatically create a web part page and add a web part to it using SPLimitedWebPartManager. I also want to set some properties for the web part and save it into the web part personalization scope. How can I access the personalization store for the web part.


Solution

  • Use the method SaveChanges on SPLimitedWebPartManager after change your properties to set them.