Documentation > CMS Template API Library > SortOrder > OrderByDescending(AssetPropertyNames)

OrderByDescending

Creates a descending sort order on a built-in field.

public CrownPeak.CMSAPI.SortOrder OrderByDescending(AssetPropertyNames)

Parameters

NameDescriptionType
name The name. CrownPeak.CMSAPI.AssetPropertyNames

Code Example

C#

Sample:

            
             int search = 1630;
             FilterParams filterParams = new FilterParams();
             filterParams.Add(AssetPropertyNames.TemplateId, Comparison.Equals, search);    
             filterParams.Limit = 10;
             filterParams.SortOrder = SortOrder.OrderByDescending(AssetPropertyNames.Label);
             List<Asset> list = Asset.Load("/Site/About Us").GetFilterList(filterParams);    
             
             

Connect with Crownpeak