Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » get_value
Thomas Schroll
Reply

Hi

I've updated a wrap solution to dw9. In the razor code is a check whether the last write time of the css is the same as area last updated time. One of the variables is:

        DateTime areaUpdated = (DateTime)Pageview.Area.get_Value("AreaUpdatedDate");

but I get the error Dynamicweb.Content.Area' does not contain a definition for 'get_Value' and I can't find another way to get the date.

Does anybody know a different method (in dw9) for getting the area last updated date?

Regards Thomas


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Thomas

The area property now returns a Content.Area instance - and you can access the properties of that using the API. In this case use:
Dynamicweb.Frontend.PageView.Current().Area.Audit.LastModifiedAt.

You can find the DW9 API here: http://doc.dynamicweb.com/api-docs

Also use the cheatsheet to find new locations in the API: http://doc.dynamicweb.com/releases-and-downloads/releases/upgrading/dw9-api-cheatsheet

Votes for this answer: 1
 
Thomas Schroll
Reply

Thanks Nicolai

I tried to look at the API documentation, but couldn't find it.

Regards Thomas

 
Nicolai Pedersen
Reply

Hi Thomas

You should use the Area.Audit.LastModifiedAt property instead og get_value(""). In DW9 the area have properties for each field instead of the get_Value approach.

 

You must be logged in to post in the forum