asp.net mvc - How to update only certain columns of a table using AJAX in MVC -


say have 4 columns in table. in mvc list view, need add ajax call (ajax.beginform) update values of 3rd , 4th column of table when button in 3rd column clicked. since 'div' cannot added inside td of table, not clear on how achieve (how reference target in updatetargetid in ajax options?)

here part of 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 submit button in 3rd column clicked need update both x , y (column 3 , 4) based on values returned controller action method. how achieve this?


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -