How to pass Area in Url.Action?

后端 未结 3 1166
广开言路
广开言路 2020-12-13 11:52

The problem in Html.ActionLink() is that you can\'t add additional html content inside the tag that it generates. For example, if you want to add an icon besides the text l

3条回答
  •  既然无缘
    2020-12-13 12:41

    @Url.Action("{action}", "{controller}", new { Area = "areaname" });
    
    @Html.ActionLink("LinkName", "{action}", "{controller}", new { area = "{areaname}"}, new { @class = "btn btn-cool" })
    

    You can use above this

提交回复
热议问题