Dynamicproperty

Vote:
 
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.
#17503
Mar 25, 2008 19:33
Vote:
 
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.
#18317
Mar 25, 2008 19:43
* 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.