I have an Html.ActionLink that I need to post to the server:
@Html.ActionLink("Some Text", "controller", "service", Model, new { @class = "btn btn-primary", @id = "someText" })
I tried Turning this into an AJAX post with:
@Ajax.ActionLink("Some Text", "controller", "service", Model, new { @class = "btn btn-primary", @id = "someText" }, new AjaxOptions(){HttpMethod = "POST"})
There is no overload for string, string, string, object, object like the above Html.Actionlink.
I am not very familiar with AJAX but is there a way to tell AJAX to pass the same data?
It looks like you have the ordering of the parameters incorrect. The
AjaxOptionscome before the attributes.