Say I have 4 columns in my table. In Mvc list view, I need to add an AJAX call (Ajax.BeginForm) that will update the values of 3rd and 4th column of the table when a button in 3rd column is clicked. Since 'div' cannot be added inside td of the table, I am not clear on how to achieve this (How would I reference my target in UpdateTargetId in Ajax options?)
Here is the part of my view,
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Num)
</td>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
<input type="submit" value="x" />
@Html.DisplayFor(modelItem => item.x)
</td>
<td>
@Html.DisplayFor(modelItem => item.y)
</td>
When the submit button in 3rd column is clicked i need to update both x and y (column 3 and 4) based on the values returned from controller action method. How to achieve this?