.net mvc 使用html.actionlink 时,怎么实现target="_blank"?

.net mvc 使用html.actionlink 时,怎么实现target="_blank"?


慕哥9229398
浏览 669回答 3
3回答

有只小跳蛙

Html.ActionLink("linkText","actionName",routeValues,htmlAttributes)htmlAttribute可以设置<a>标签的属性,如 Html.ActionLink("detail","Detail",new{id=1},new{ target="_blank"})会生成 <a href="Products/Detail/1" target="_blank">detail</a>

九州编程

<%:Html.ActionLink("通讯录", "call", "callAction", new { classes = "customer", method = "query", nextPage = "customer.aspx" }, new { target = "right" }) %>
打开App,查看更多内容
随时随地看视频慕课网APP