0
PotalSiteMapProvider不返回頁面。我使用的代碼如下:PotalSiteMapProvider不返回頁面
PortalSiteMapProvider prov = PortalSiteMapProvider.CurrentNavSiteMapProviderNoEncode;
prov.DynamicChildLimit = 0;
prov.IncludeSubSites = PortalSiteMapProvider.IncludeOption.Always;
prov.IncludePages = PortalSiteMapProvider.IncludeOption.Always;
prov.IncludeHeadings = true;
prov.IncludeAuthoredLinks = true;
SiteMapNode root = prov.RootNode;
//prov.IncludePages = PortalSiteMapProvider.IncludeOption.Always;
SiteMapNodeCollection collection = prov.GetChildNodes(root);
foreach (SiteMapNode thisNode in collection)
{
SiteMapNodeCollection thisCollection;
if (thisNode.GetType() == typeof(PortalWebSiteMapNode))
{
prov.IncludePages = PortalSiteMapProvider.IncludeOption.Always;
thisCollection = prov.GetChildNodes((PortalWebSiteMapNode)thisNode);
}
}
我看着它通過調試,thisCollection,不具有任何孩子,雖然thisNode是具有頁面的子網站節點。我在做什麼錯誤,我怎樣才能得到那個節點中的頁面? 謝謝!