Issue with Ajax.ActionLink incorrectly rendering links when using htmlAttributes

这一生的挚爱 提交于 2019-12-03 23:10:32

You need to use the correct overload of the method. The one you are using takes an IDictionary and that's why it's rendering the way it is.

If you choose the object RouteValues and object htmlAttributes like this:

<%= Ajax.ActionLink("Delete", "Delete", "Milestone", new { id = Model.Id }, 
new AjaxOptions { HttpMethod = "GET", UpdateTargetId = "ModalDeleteContainer", 
OnSuccess = "modalDelete" }, new { })%>

it will all work!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!