Как открыть внешний URL (скажем, Google.com) в новом окне браузера /вкладке из кнопки MVC Controller Нажмите на основе условий успеха /сбоя. Так что я попробовал это < /p>
//Controller code
public ActionResult Index( )
{
--Do some logic
if(logicpasses)
{
return Redirect("http://google.com"); -- This doesn't work out as it's navigating to the URL in the same tab
return JavaScript("Window.open('http://google.com')"); -- This is not working as well
}
else
{
return Redirect("http://google.com");
}
}
Подробнее здесь: https://stackoverflow.com/questions/293 ... controller