Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 311731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:57:06+00:00 2026-05-12T07:57:06+00:00

In sharepoint how can i access all lists the site that have a certain

  • 0

In sharepoint how can i access all lists the site that have a certain name eg:

SPList list= web.Lists["MyList"]

will get it me at the root, but how can i access all of them that have that name in subsites also.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:57:06+00:00Added an answer on May 12, 2026 at 7:57 am

    You’ll have to iterate through all the subsites of the site/site collection and see if that site has a list by the name of MyList in it. The SPWeb.webs property can get you all the sites underneath a site.

    Edit

    The reason for this is that sites in SharePoint are independent so you can’t access resources in another site or site collection without first accessing that site or site collection.

    So, to do a something like pulling up all tasks assigned to user, you would need to load every site in every site collection and check the task list to see if it had a task for that user. You can read this to get a better understanding of how Site Collections work. Sites function similarly, but are stored in the same contend database as the root site collection.

    Edit 2

    Or as pointed out in the comments on here, you can run an SPSiteDataQuery on a site collection so to iterate everything you’d just to have to iterate across site collections.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I modify a SharePoint site so that versioning is turned on by
When developing web parts in SharePoint can I inherit from the existing web parts
In SharePoint 2007, there's a top nav that the user can hover over, which
Is it possible in a SharePoint 2007 list (MOSS, though I don't think that
I have a requirement to lock down access to a SharePoint library: Only users
In CAML I can query SharePoint Listitems using the Contains-element, but there is no
in sharepoint webservices, I can use getListItems() to obtain the child elements of a
How can I, as the wiki admin, enter scripting (Javascript) into a Sharepoint wiki
I am trying to develop everything in sharepoint as features so I can easily
I hope there's a SharePoint expert here on SO who can help with this.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.