What is the right pattern for using JQuery Ajax and ASP.Net Mvc?

I would approach this using jQuery and JsonResult Controller. Your jQuery code would call the JsonResult which would pass the pertinent information off to the model code to handle adding a new vote. I wrote a brief tutorial on similar concepts which is available at http://www.dev102.com/2008/08/19/jquery-and-the-aspnet-mvc-framework/


Yes, it sounds like you've got it about right.

Note, however, that if you change postId to Id, then you could call with a URL like:

http://example.com/posts/voteUp/5

(With the default routing.) It's a question of personal preference.