By default all the links from the SharePoint menu are opened in same window. But if we want to open the link in new window/tab for few links(each link will SiteMapNode), use the following code
bool IsNewWindow =true; string URL = "http://dotnetmirror.com"
SiteMapNode node = new SiteMapNode(object of SPNavigationProvider,
"KEY",
IsNewWindow ? string.Format("javascript:window.open('{0}','_blank'); void(0);", URL) : URL
); SharePoint ASPMenu can be seen in master page. ASPMenu control binds to a SiteMapProvider which will have siteMapNodes.
|