Как открыть внешний URL-адрес (скажем, google.com) в новом окне/вкладке браузера с помощью нажатия кнопки контроллера MVC в зависимости от условий успеха/неудачи. До сих пор я пробовал это
//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