要在门户某些区域中获取该区域下所有子区域的信息,有两个方法:
         直接引用这个类:Microsoft.SharePoint.Portal.WebControls.BaseAreaWebPart。this.CurrentAreaId拿到当前区域的GUID,详细的方法可以参考sharepoint的sdk。
        另外一种方法是:
        //通过Pageinfo对象获取当前页面的GUID
       PageInfo currentPage = PageInfo.GetPageInfo();
       Guid areaGUID = currentPage.CategoryId;
   
       //结合PageInfo的GUID,获取当前区域,简单吧?呵呵!
       PortalContext portalContext = PortalApplication.GetContext(areaGUID);
       Area currentArea = AreaManager.GetArea(portalContext,areaGUID);
   
       //对当前区域的子区域做展现
      foreach(Area oneArea in currentArea.Areas)
     {
      output.Write("<a href='" + oneArea.UrlNavigation + "'>" + oneArea.Title + "</a><br>");
      }

相关文章:

  • 2022-12-23
  • 2021-10-11
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-06
相关资源
相似解决方案