Interviews - C# Corner

Sagar Pardeshi
Q. What is query.ViewAttributes OR How can you force SPQuery to return results from all the folders of the list?
By Sagar Pardeshi in SharePoint onNov 27 2014
  • Ashish Mate
    Aug, 2015 26

    Hello. you need to specify the scope under ViewAttributes of query. ex query.ViewAttributes="Scope=\"Recursive\"";

    • 1
  • Venkatareddy Annapareddy
    Jan, 2018 22

    query.ViewAttributes="Scope=\"RecursiveAll\"

    • 0
  • Suchitra Behera
    Dec, 2015 8

    ViewAttributes is used to define scope to return items.if query.ViewAttributes="Scope=\"Recursive\" then it will return all items within folder and subfolder excluding folder, it will exclude folder but can retrieve items from that folderif query.ViewAttributes="Scope=\"RecursiveAll\" then it will return all items within folder and subfolder including folders

    • 0
  • sudi kumari
    Sep, 2015 1

    spquery.viewatributes="scope="/recursive/""

    • 0
  • Sagar Pardeshi
    Nov, 2014 27

    If you use SPQuery on any SPlist .. it will bring back results from the current folder only. If you want to get results from all the folders in the list.. then you need to specify the scope of the query by the use of ViewAttributes.. e.g. query.ViewAttributes = "Scope=\"Recursive\"";

    • 0

Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS