I want to search for a document that has a property with a particular value. Document.GetChildrenBySearch looks like a good candidate but I have no idea what the searchString parameter should look like. Can I get an example or a pointer to where some documentation on it is? Thanks.
Search for Document
I want to search for a document that has a property with a particular value. Document.GetChildrenBySearch looks like a good candidate but I have no idea what the searchString parameter should look like. Can I get an example or a pointer to where some documentation on it is? Thanks.
Hi Jason,
First it would be nice to know in which environment you wish to achieve this. Would it be in an usercontrol, xslt or razor for example?
It will be in a c-sharp usercontrol. Thanks
I think the System.Linq Where function must be able to help you out. Use it like this:
IEnumerable<Document> searchResult = Document.Children.Where(n => n.GetPropertyAsString("example") == "test");
is working on a reply...