Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Just want to make sure that the following syntax will work. The look-up list is on the parent list.

SPList lookupList = web.ParentWeb.GetList("States");
share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

The syntax looks fine, of course there are a lot of assumptions here:

  • you are not already at the top-level web
  • the list exists on the parent
  • the current user has permissions to the list on the parent web

If you are fine with all those assumptions, it looks right.

share|improve this answer
    
All of your assumptions are correct. Cool. I will implement it accordingly. Thanks –  K K Jun 10 '11 at 5:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.