Domanda

How do I Open a View in a New Window on click of Sitemap Node to which it is mapped. for example:

     <siteMapNode title="Search"  controller="Search" action="Index" localizationResource=""  authorizationResource=""/>

How do I open 'Index' View in New Window on click of Search item? Right now its opening in the same Window.I tried using target = "_blank" but its not working.

È stato utile?

Soluzione

Use jquery. Give the sitemap nodes a class

$('.mapNode').click(function(){
  var url = '/' + $(this).attr("controller") + '/' + $(this).attr("action");
  window.open(url);
  return false;
});
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top