Search code examples
.netepiserver

Differens between page["propertyName"] and page.property["propertyName"] in EPiServer?


What is the difference between accessing a property through page["propertyName"] and page.Property["propertyName"] in EPiServer?

Thanx!


Solution

  • page["PropName"] uses the indexer of the PageData class to return the Value of the PropertyData object.

    page.Property["PropName"] will return the whole PropertyData object (for example a PropertyLongString)

    so page["PropName"] equals page.Property["PropName"].Value