Page 1 of 1

Öffnen Sie die externe URL in einem neuen Browserfenster vom MVC -Controller

Posted: 08 Feb 2025, 15:03
by Guest
Wie öffne ich eine externe URL (sagen wir google.com) in einem neuen Browserfenster /einer Registerkarte von MVC Controller. Klicken Sie auf den Erfolge /Fehler.

Code: Select all

    //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");
}
}