Tuesday, September 22, 2009

siteMapNode target="_blank"

Don't waste your time adding a target="_blank" attribute in your sitemapNode, IT DOESN'T WORK. There is a work around though. Add JavaScript to open your link in a new page.

Example:
(Will not work)<sitemapnode url="http://www.google.com" title="Google" target="_blank">

(WORKS!)<sitemapnode href="javascript:var w=window.open('http://www.google.com','google');" title="Google" />

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. How do i do it in MVC for example i have in here:
    --siteMapNode title="Add" controller="Home" action="Index" -- How do i open 'Index' view in new window? thanks in advance.

    ReplyDelete