Try our conversational search powered by Generative AI!



I have some trouble making my Dynamic Content control remembering the property setting that the user chooses when creating the control in the editor with the {} button. The "add" window pops up and gives me the dafault values I have set programatically, but as soon as I press "OK" and then pop up the same dialog again, the new values are gone, being replaced by the default values.

This my Properties property method:

public EPiServer.Core.PropertyDataCollection Properties {
return _props;
_props = value;


I guess there is something wrong here - but I cannot find any examples showing the use of more than one property.

Oct 02, 2008 12:50

Hi Dag!

Actually the Properties collection will not store any state, it will only take care of the rendering of the PropertyData contained in it. You will be responsible for storing and loading the state yourself, using the State property in IDynamicContent.

Basically, what you need to do is to fetch the data from Properties in the get part of the State accessor and save it in the state string. Then you would need to, in the set part, refill the Properties collection with the values from the state string.

Here is a link to a more detailed guide on how you can work with the settings for dynamic content.


Per Gunsarfs
EPiServer CMS development team

Oct 02, 2008 16:23

Thank you, Per - that answer my question extremely well :)


Oct 06, 2008 9:37
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.