Try our conversational search powered by Generative AI!

Disable auto update of the property value after the content has changed when editing on page



Is it possible to disable auto update of the property value after the content has changed, or just re-render the whole page, when editing on page?

Consider following (just an example to illustrate the problem)


<h1 ID="heading" runat="server"><%: CurrentPage.PageName.Replace("Page", string.Empty) %></h1>


heading.ApplyEditingAttributes(p => p.PageName);


When the editor changes the value of PageName from let's say 'Page1' to 'Page2', 'Page2' will be rendered, not just '2' as expected. When the editor reloads the page the Replace function will be called and just '2' will be rendered.

Even worse when we want, lets say, let the editor edit a LinkCollectionList and we doesn't use the EPiServer Property control to render it, instead we use a Repeater and render something completely different from an ul-list. When the editor adds a link everything will be replaced by an ul-list.

How can we handle these cases?

Jan 18, 2013 18:27


I don't know how to disable auto updating although that'd be interesting to look into. What you can do though is, like you say, force a full refresh when a property's value changes. In Web Forms you can do that in the code behind of a template which inherits from PageBase<T> or a user control in which you can get ahold of the ASPX in the form of a PageBase<T>.

For instance, in OnLoad for an ASPX you could do this:

PageBase<Article> template = this;
template.EditHints.AddFullRefreshFor(x => x.PageName);

For that to work you need to have FullRefreshPropertiesMetaData control somewhere on your page, preferably in the master page.

<EPiServer:FullRefreshPropertiesMetaData runat="server"/>



Edited, Jan 20, 2013 14:08

And Thanks. Will have a look into AddFullRefreshFor(). Would be nice if there was a global setting, regardless property, to refresh the page.

Jan 20, 2013 17:19
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.