asp.net-mvcactionlink

ASP.NET MVC ActionLink and post method


Can anyone tell me how can I submit values to Controller using ActionLink and POST method?
I don't want to use buttons.
I guess it has something with jquery.


Solution

  • You can't use an ActionLink because that just renders an anchor <a> tag.
    You can use a jQuery AJAX post.
    Or just call the form's submit method with or without jQuery (which would be non-AJAX), perhaps in the onclick event of whatever control takes your fancy.