I have a mvc3 strong typed partial view with a viewmodel containig a list of items.
I use a foreach-loop to genereate a table of this items.
There should be an icon on each line to delete that item from the list. the delete should be a call to a service, to delete the item fr开发者_Go百科om the database and remove the item from the model, the refresh should be AJAX, so I don't need to refresh the whole page.
is ajax.actionlink the right thing to use or should I do something else?
Yes, you can use Ajax.ActionLink to call action for deleting items on the server. However you will need to refresh your table/grid additionaly calling other actions or just remove current row using javascript (if you don't have pager or something like this).
精彩评论