Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

IPersonalizable.Load does not get called from web part

$
0
0

Hi,

I created a simple web part class derived from System.Web.UI.WebControls.WebParts.WebPart (tried SharePoint web part as well) with IPersonalizable interface implemented.

Save is called but Load is not.

		public new void Load(PersonalizationDictionary state)
		{
			if (state != null)
			{
				ContentString = Convert.ToString(state["ContentString"].Value);
			}
		}

		public void Save(PersonalizationDictionary state)
		{
			if (state != null)
			{
				state["ContentString"] = new PersonalizationEntry(ContentString, PersonalizationScope.Shared);
			}
		}


If I use Personalizable attribute on a property, it's saved and restored.

What do I need to make Load to be called?

I've created an example with a simple web part that demonstrates the problem with BinaryWebPartSerializer/Deserializer

https://docs.google.com/file/d/0B59b5ecJhtCONGZkMW5aQ1BoQnM/edit?usp=sharing

Update July 26, 2013:

This is a still a problem with the March 2013 Public Update
v15.0.4481.1005


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>