Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Override property value in edit mode


Do you know how to override property value in edit mode?

For example:

public virtual string AboutUsLinksTitle
           var value = this.GetPropertyValue(p => p.AboutUsLinksTitle);
           return string.IsNullOrWhiteSpace(value) ? "overrided value" : value;
           this.SetPropertyValue(p => p.AboutUsLinksTitle, value);

In debug it returns "overrided value", but shows empty value. It's probably, because of proxy class which is created in the background...


Jan 03, 2017 13:45

Hi Paweł,

The code inside getter will never be executed in All Properties view. Only in On-Page Editing view, and actual page/block view.

Jan 03, 2017 17:28
* 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.