문제

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.

도움이 되었습니까?

해결책

Use jquery. Give the sitemap nodes a class

$('.mapNode').click(function(){
  var url = '/' + $(this).attr("controller") + '/' + $(this).attr("action");
  window.open(url);
  return false;
});
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top