我有一个 Html.ActionLink 需要发布到服务器:
@Html.ActionLink("Some Text", "controller", "service", Model, new { @class = "btn btn-primary", @id = "someText" })
我试着把它变成一个 AJAX 帖子:
@Ajax.ActionLink("Some Text", "controller", "service", Model, new { @class = "btn btn-primary", @id = "someText" }, new AjaxOptions(){HttpMethod = "POST"})
没有像上面的Html.Actionlink那样的字符串、字符串、字符串、对象、对象的重载。
我对 AJAX 不是很熟悉,但有没有办法告诉 AJAX 传递相同的数据?