kjv
kjv

Reputation: 11327

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.

Upvotes: 1

Views: 10696

Answers (3)

Avi
Avi

Reputation:

To modify web part property values programmatically, refer following post:

http://www.etechplanet.com/post/2009/03/19/Modify-property-values-of-a-web-part-in-SharePoint-website-programmatically-using-C.aspx

Upvotes: 0

Avi
Avi

Reputation:

Please refer following post for adding web part programmatically:

http://www.etechplanet.com/post/2009/03/18/AddingRemoving-web-part-programmatically-in-SharePoint-website-using-C-Code.aspx

Upvotes: 0

VS from Devpci
VS from Devpci

Reputation:

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

Upvotes: 1

Related Questions