I tried this code from the sdk.
protected void dubugprop()
{
DynamicPropertyCollection props = DynamicProperty.ListForPage(CurrentPage.PageLink);
foreach(DynamicProperty prop in props)
{
Response.Write("Property " + prop.PropertyValue.Name + " is");
switch(prop.Status)
{
case DynamicPropertyStatus.Defined:
Response.Write(" set on this page to " + prop.PropertyValue.ToString());
break;
case DynamicPropertyStatus.Inherited:
Response.Write(" inhertied from " + prop.InheritedPageLink.ToString() + " with value " + prop.PropertyValue.ToString());
break;
case DynamicPropertyStatus.Undefined:
Response.Write(" not defined.");
break;
}
Response.Write(" ");
}
If the status is Inherited the property value is not printed.
Hello and thanks for the report!
The correct syntax for the row that prints the dynamic property value if it is inherited should be:
Response.Write(" inhertied from " + prop.InheritedPageLink.ToString() + " with value " + prop.InheritedValue.ToString());
I have updated the sdk for the next release.
protected void dubugprop() { DynamicPropertyCollection props = DynamicProperty.ListForPage(CurrentPage.PageLink); foreach(DynamicProperty prop in props) { Response.Write("Property " + prop.PropertyValue.Name + " is"); switch(prop.Status) { case DynamicPropertyStatus.Defined: Response.Write(" set on this page to " + prop.PropertyValue.ToString()); break; case DynamicPropertyStatus.Inherited: Response.Write(" inhertied from " + prop.InheritedPageLink.ToString() + " with value " + prop.PropertyValue.ToString()); break; case DynamicPropertyStatus.Undefined: Response.Write(" not defined."); break; } Response.Write("
If the status is Inherited the property value is not printed."); }