I have a news list and I want to sort it by a data property, If i put the Sort by in the ascx file it works (see below) but I want to do the sorting via the code behind; however when i try NewsListCtrl.SortBy["MyDateControl"] it agrues saying its not an int? So why does it not complain when the ascx file has the same thing?
I have a news list and I want to sort it by a data property, If i put the Sort by in the ascx file it works (see below) but I want to do the sorting via the code behind; however when i try NewsListCtrl.SortBy["MyDateControl"] it agrues saying its not an int? So why does it not complain when the ascx file has the same thing?
<EPiServer:NewsList PageLinkProperty="Review" ID="NewsListCtrl" runat="server" SortBy="ReviewDate" >