Friday, February 24, 2012

Add to Quick Launch

private static void AddToQuickLaunch(SPWeb web, string viewUrl, string viewTitle)
{
if ((string.IsNullOrEmpty(viewTitle))
(string.IsNullOrEmpty(viewUrl)))
{
return;
}
SPNavigationNodeCollection nodes;
SPNavigationNode node;
nodes = web.Navigation.QuickLaunch;
node = new SPNavigationNode(viewTitle, viewUrl);
nodes.AddAsFirst(node);
}

No comments:

Post a Comment