动作链接mvc

Har*_*ala 1 asp.net asp.net-mvc-3

如何打开一个新窗口,链接到MVC的OutSide并在打开时获取一些参数?

@Html.ActionLink("SomeTextForLink", "wwww.google.com", null, new { querystring values}, new { target ="_blank"})
Run Code Online (Sandbox Code Playgroud)

我想打开类似于www.abc.com/contact.aspx?id=22MVC页面之外的东西

谢谢

dkn*_*ack 6

你不能使用ActionLink.ActionLinks仅用于指向应用程序内的Action的链接.

您可以使用通常的链接

<a href="@string.Format("http://www.abc.com/contact.aspx?{0}", yourQueryString)" target="_blank">
    Link Text
</a>
Run Code Online (Sandbox Code Playgroud)