Hello Kentico Team,
I am attempting to build a report of sorts that will include the last time a page was modified.
I am building this using a Hierarchical Transformation so that the report will match the tree structure.
My transformation included the following attempt to pull in the DateModifiedWhen information: <%# FormatDateTime(DocumentModifiedWhen, "MM/dd/yyyy") %>
<%# FormatDateTime(DocumentModifiedWhen, "MM/dd/yyyy") %>
However this returned the following error: kentico error CS0103: The name 'DocumentModifiedWhen' does not exist in the current context
kentico error CS0103: The name 'DocumentModifiedWhen' does not exist in the current context
How do I modify my request to meet kentico's context expectations? I tried using TreeNode.DocumentModifiedWhen instead, but that just resulted in a slightly different error.
TreeNode.DocumentModifiedWhen
Is there something I need to include to dictate which level of hierarchy I am on, or a different namespace I need to call?
Thanks in advance.
-mike
You have to Eval the property:
<%# FormatDateTime(Eval("DocumentModifiedWhen"), "MM/dd/yyyy") %>
Thank you, Dat. I was definitely trying to over-complicate it.
Please, sign in to be able to submit a new answer.