Try our conversational search powered by Generative AI!

How to set a Default value to a Episerver property.


When a property is created for a page, it is possible to set a default value to that property from the admin mode.

But how does this default value works? How can we retrieve the default value from the property.


Apr 08, 2009 13:42


The default value works in the way that when you call DataFactory.Instance.GetDefaultPageData(parentId, pageType) the properties on the PageData will contain any default values set in admin mode.

If you direclty want to access the default value for a property definition directly from code you need to load the PageDefinition and get the DefaultValue from that object.


Per Gunsarfs
EPiServer CMS Development Team

Apr 08, 2009 14:00
* 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.