1
我想添加一個新的導航節點到頂部導航欄在我的SharePoint網站,我使用下面的代碼:添加新的導航節點到SharePoint 2010頂部導航
public void AddNavigation(SPWeb web, String url, string module, string key)
{
var resourceFile = "$Resources:" + module + "," + key;
UnregisterGlobalNavigationLink(web, url);
SPNavigationNode node = web.Navigation.GetNodeByUrl(url);
if (node != null && overrideGlobalNavigationSetting) return node;
node = new SPNavigationNode(resourceFile, url);
node = web.Navigation.TopNavigationBar.AddAsLast(node);**//Exception here**
}
但我得到的例外,我不知道如何解決:
An unexpected error occured while manipulating the navigational structure of this Web.
我該如何解決這個問題?
感謝您的回答,但是,我應用了這個解決方案,並且異常仍然發生。 – Arman