.net - Get parent web not top level -
I have created a custom lookup field and I am looking to see the contacts in my top level site. But I want to see it in the subsite.
dataSource.List = site.RootWeb.Lists ["Contact"];
This is the code used for lookup, but I reference the web for the web and I do not want anyone to do it?
thx
Assume that "site" is your current web site, just look On site. Web or site GetSubwebsForCurrentUser () I believe that the former will try to give you all the stuff, even if the current user is not used, the latter may have been liked.
Update - I later hinted you the title of your question that you want to be on the parent side when the text of your question indicates that you want a subway to have a subweb above the original The web bus is the site. ParentWeb (Once again, say "Site" is your SPB) if you want to check that, you can always check it out.
Yet another update - Based on your comment, it seems that "site" might be an SPS ite instead of SPVE. To get a web site, you have to do something like a site. OpenWeb () (now assuming "site" is an SPS ite). When you do, it will be good to do this in C #, using the statement to clear SPWeb. Note that the OpenWeb method can not take any parameters that works fine if SPSite was instituted with the full URL of your SPBLack. Or OpenWeb can take a URL parameter.
Comments
Post a Comment