I have a series of related WSS sites, and I have a document library
containing documents that are related to each of the WSS sites. The
document library is stored in a portal area.
I would like to add a web part to each of those sites that displays the
contents of the document library.
Can someone tell me how I can programmatically access the contents of a
portal area document library from a WSS site?
Basically, I know that I need to access the Area object, and from there,
I can create a SPQuery. And I know it is something like the following
code snippet. Except that if I am in a WSS site, than I do not have the
PortalContext.Current available.
Area area = AreaManager.GetArea(PortalContext.Current, new
Guid(AreaID));
list = area.Web.Lists[ListID];
SPQuery query = new SPQuery();