CAML query that includes folders in result set

前端 未结 7 1820
孤街浪徒
孤街浪徒 2020-12-16 01:29

I\'m trying to write a CAML query that executes against a specific SPList, scoped to a specific folder, recursive from that point, and returns all ListItems (which meet a cr

相关标签:
7条回答
  • 2020-12-16 02:30

    I don't have my dev image to test against, so I might need to revise this later; but I think you could try

    query.ViewAttributes = "Scope=\"Recursive\""; 
    

    Retrieving the items will allow you to use SPUtility.GetUrlDirectory(url) to get the folder path for a given item, and parse the folder hierarchy from there.

    0 讨论(0)
提交回复
热议问题