1. html.ActionLink生成一个<a href=".."></a>标记。。
例如:
@Html.ActionLink(“链接文本”、“someaction”、“somecontroller”,new { id = " 123 " },null)
生成:
< a href = " / somecontroller / someaction / 123 " >链接文本</a>
======================================================
2.而Url.Action只返回一个url
Url.Action(“someaction”、“somecontroller”,new { id = " 123 " })
生成:
/ somecontroller / someaction / 123

======================================================
3、Html.Action可以执行一个控制器的action,并将返回结果作为html string。

相关文章:

  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2021-12-30
  • 2021-06-17
  • 2021-12-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-20
相关资源
相似解决方案