I currently have the following grid on my page:
<tr ng-repeat="cartItem in vm.shoppingCart">
<td>{{cartItem.Title}}</td>
<td>
@using (Html.BeginForm("Delete", "MyController", FormMethod.Post))
{
@Html.AntiForgeryToken()
<input type="submit" value="Delete" id="DeleteBtn" name="DeleteBtn" class="btn blue" />
}
</td>
Our users have requested that the delete happen with a post to the server, so we setup a form in the grid, i'm not sure if that's the best way to go about it. also how would we pass in the Id (cartItem.Id) of the item to delete to the action? Is it common to have a form in each row like this? otherwise we can convince the users to do it through client side.