/ Published in: C#
Short example of how to use the FindCOntentParameters.PropertiesFilterParameters when searching andvanced properties (with special characters)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
ClientServices2.ContentService.FindContentParameters fcp = new ClientServices2.ContentService.FindContentParameters(); fcp.SessionContext = sessionContext; fcp.ServiceID = TG4TestApp.Properties.Settings.Default.ServiceID; fcp.StartPos = startPos; fcp.MaxResult = maxResult; fcp.SortOption = sortOption; // fcp.PropertiesFilter = propertyFilter; //create PropertiesFilterParam placeholder %1. ClientServices2.ContentService.PropertiesFilterParameter propParam = new ClientServices2.ContentService.PropertiesFilterParameter(); propParam.PropertyName = "Date"; //name propParam.PropertyMatchString = "04/07/2011"; //value //create new PropertiesFilterParameters array and add the propParam fcp.PropertiesFilterParameters = new ClientServices2.ContentService.PropertiesFilterParameter[] { propParam }; //set the property filter fcp.PropertiesFilter = "%1"; TG4TestApp.ClientServices2.ContentService.ContentVO[] cs = ics.FindContent(fcp);