Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jason N 55 posts 79 karma points
    May 25, 2011 @ 23:54
    Jason N
    0

    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.

  • Mathijs 27 posts 60 karma points
    May 26, 2011 @ 04:09
    Mathijs
    0

    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?

  • Jason N 55 posts 79 karma points
    May 26, 2011 @ 07:49
    Jason N
    0

    It will be in a c-sharp usercontrol. Thanks

  • Mathijs 27 posts 60 karma points
    May 26, 2011 @ 16:57
    Mathijs
    0

    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");

Please Sign in or register to post replies

Write your reply to:

Draft