I have a table with up to 10 listed services, and each row has an update button. When you click the refresh button, a modal window opens with the data in this row, as well as a form for change.
However, I can not get the controller to return a partial view when the button is clicked and open the modal window with the updated data. I'm using bootstrap for the frontend.
FrontEnd Code Snippet:
<tbody>
@foreach (var item in Model)
{
<tr>
<td><input type="checkbox" class="checkthis" /></td>
<td>@item.Chave</td>
<td id="Nome @item.Chave">@item.Nome</td>
<td>
<p>
<a href="@Url.Action("Atualizar","Servico", new {chave = item.Chave})" class="btn btn-primary btn-xs atualizar" data-title="Edit" data-toggle="modal" data-target="#edit" data-placement="top" rel="tooltip"><span class="glyphicon glyphicon-pencil"></span></a>
</p>
</td>
</tr>
}
</tbody>
According to the above code, I need to click on the precise one to open a modal with the line service data.
The above code only accesses the controller and returns the partial view, but how can I open a modal from this? Is it possible with Ajax?