.net mvc 使用html.actionlink 時(shí),怎么實(shí)現(xiàn)target="_blank"?
3 回答

郎朗坤
TA貢獻(xiàn)1921條經(jīng)驗(yàn) 獲得超9個(gè)贊
Html.ActionLink("linkText","actionName",routeValues,htmlAttributes)
htmlAttribute可以設(shè)置<a>標(biāo)簽的屬性,
如 Html.ActionLink("detail","Detail",new{id=1},new{ target="_blank"})
會生成 <a href="Products/Detail/1" target="_blank">detail</a>

素胚勾勒不出你
TA貢獻(xiàn)1827條經(jīng)驗(yàn) 獲得超9個(gè)贊
<%:Html.ActionLink("通訊錄", "call", "callAction", new { classes = "customer", method = "query", nextPage = "customer.aspx" }, new { target = "right" }) %>
- 3 回答
- 0 關(guān)注
- 325 瀏覽
添加回答
舉報(bào)
0/150
提交
取消