Developer forum

Forum » Templates » dw9 - Getting created date from page object

dw9 - Getting created date from page object

Claus Kølbæk
Claus Kølbæk
Reply

Hey

So while upgrading an old template to dw9 I ran into the problem of needing the created date of a page.

In DW8 I could do something like this:

    int pageId = 1;
    Dynamicweb.Content.Page page = Dynamicweb.Content.Page.GetPageById(pageId);
    DateTime created = page.CreatedDate;

Now when I get the page object in 9 with:
Dynamicweb.Extensibility.ServiceLocator.Current.GetPageService().GetPage(pageId);

It seems it no longer have the property CreatedDate - anyone whom would be kind and assist me in finding it? :)


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Claus

That would be the Audit property of Dynamicweb.Content.Page:

http://doc.dynamicweb.com/Default.aspx?ID=8258#article=7a9e65e0-8347-372b-1b89-617a12bc4b5c

BR Nicolai

Votes for this answer: 1
 
Claus Kølbæk
Claus Kølbæk
Reply

Damnit! Was certain I had read em all :)

Thank you for the fast response.

 
Nicolai Pedersen
Reply

Well, it is not that easy to spot - I'll grant you that :-).

Happy coding!

 

You must be logged in to post in the forum