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

  • SEARCH
  • Home
  • 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 382909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:13:53+00:00 2026-05-12T15:13:53+00:00

Its a kind of newbie question: We have a web part with user controls

  • 0

Its a kind of newbie question:

We have a web part with user controls and a SP list as data source.

For different kind of sites say team sites, publishing portals etc the path for the respective list would be different. eg: Team Site it would be http://<Server>/Lists/<List Name> and for Publishing portal with Localization http://<Server>/<Locale>/Lists/<List Name>.

How do you manage the web part to be working no matter where the list is placed in the site collection?

Please suggest.

  • 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-12T15:13:53+00:00Added an answer on May 12, 2026 at 3:13 pm

    On most web sites I have a Configuration list in the root of the site collection. The list consists of key/value pairs. It is restricted to administrator access only and stores settings such as this. As it’s just another SharePoint list it’s very easy to edit.

    So the web part would execute an SPQuery over the Configuration list and look for a particular key (e.g. “List Data Source Location”). The URL would be returned and can then be used as the data source. There is no need to set the key or URL on every instance of the web part, although you may like to implement a default that can be overridden.

    (As an aside, a better alternative to using your own Configuration list if you need to store more complex data structures is SPConfigStore.)

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

Sidebar

Related Questions

Well it's kind of a newbie question but I think lots of people have
Maybe its a newbie question but I need some info for what I have
its kind of silly question. but i dont know what mistake i am making.
I have kind of library which uses a bunch of its own perf counters.
This is a very newbie kind of ASP.NET question: I simply don't know and
I am kind of a newbie so excuse me if this question is too
Kind of a newbie question, I guess, but nevertheless: I'm implementing a Bootstrap split
I'm a newbie so be kind to me :) I have a large text
Got a simple Newbie kind of a question. I would like to share an
Got a simple Newbie kind of a question. I would like to share an

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.