asp.net mvc Html.ActionLink() keeping route value I don't want

后端 未结 9 1878
我寻月下人不归
我寻月下人不归 2020-11-30 04:34

I have the following ActionLink in my view

<%= Html.ActionLink(\"LinkText\", \"Action\", \"Controller\"); %>

and it creates the follo

9条回答
  •  爱一瞬间的悲伤
    2020-11-30 05:13

    I explicitly set the action name as "Action/". Seems a little like a hack but it's a quick fix.

    @Html.ActionLink("Link Name", "Action/", "Controller")
    

提交回复
热议问题