Deliver superior customer experiences with an AI-driven platform for creating and deploying cognitive chatbots
Deliver Awesome UI with the most complete toolboxes for .NET, Web and Mobile development
Automate UI, load and performance testing for web, desktop and mobile
A complete cloud platform for an app or your entire digital business
Detect and predict anomalies by automating machine learning to achieve higher asset uptime and maximized yield
Automate decision processes with a no-code business rules engine
Optimize data integration with high-performance connectivity
Connect to any cloud or on-premises data source using a standard interface
Build engaging multi-channel web and digital experiences with intuitive web content management
Personalize and optimize the customer experience across digital touchpoints
Build, protect and deploy apps across any platform and mobile device
The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
I’ve decided that it would be a good idea to make a short post on something simple, to give you the break from the epic series and posts I’ve been posting lately. So, in this post I’ll explain how to create a simple user control that displays x number of last modified pages. Take a look at the Figure 1 to see what I have in mind (if you don’t care and just want to get the code, you can do it here).
Figure 1 – Site Activity control displays last pages that have been modified with their titles, link to them and time at which they have been modified
The markup I’ve made is rather simple – repeater and unordered list. Here is how the front end of this control looks like:
As I’ve said – nothing special here. We’ll bind the repeater to the data source and on the ItemDataBound bind the pageLink HyperLink control and pageData Label with respective data.
I’ve commented most of the code and its logic is very simple – so I won’t go into much detail here. You’ll see that we are using CmsManager which is the API class responsible for any pages/templates/controls work. This is the method I’ve used to get the list of pages:
The first two arguments are paging arguments : start and count. I’ve specified the control to start at 0 and get the number of modified pages that user specified through ActivityCount property. Then we have the sort expression, which in our case is “DateModified” and when we pass descending sort direction after that – we get exactly what we want – last x number of modified pages. The last output parameter is not used in my code, however API mandates it so I’ve just declared it there.
To get this control working please do following:
And that’s it.
View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.
Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.