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

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Öffnen Sie die externe URL in einem neuen Browserfenster vom MVC -Controller

by Guest » 08 Feb 2025, 15:03

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

Top