DotNet Mirror
  DNM facebook   DNM Google+   DNM Twitter   

SharePoint AspMenu control set href location to new window/tab using siteMapNode

By Ashok Nalam on 01 May 2013 | Category: Sharepoint | Tagged: control menu sitemap ASP.NET 
  Discuss Add Comment   |  
Add rating Rate this resource   
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.
  Discuss Add Comment    
Add rating Rate this resource   
About the Contributor
Member Since : 10 Dec 2012
Member Points (Level) : 9226  (Professional)
Location : INDIA
Home Page : http://dotnetmirror.com
About : I am admin of this site.
Rate this resource
 
Add your Comment
Name Email WebSite
Captcha Refresh


Comments (0)
No comments found, click here to add comment.
 
cheap jordans|wholesale air max|wholesale jordans|wholesale jewelry|wholesale jerseys