在视图中使用asp.net mvc。 如何在新标签中重定向到外部网页?
<%= Html.ActionLink("Paypal", "HowItWorksRedirect", null, new { @class = "Paypal" })%>
public ActionResult HowItWorksRedirect()
{
return Redirect("https://www.paypal-deutschland.de/sicherheit/schutzprogramme.html");
}
答案 0 :(得分:2)
您不会将此传递给控制器操作,因为您没有链接到您自己的网站。只需手动编写标记。如果您需要重复使用它,请将其放在部分或部分视图中:
<a href="https://www.paypal-deutschland.de/sicherheit/schutzprogramme.html" target="_blank" class="Paypal">Paypal</a>