0
I am unable to capture the data-id of my TR.
<script>
function EditarContato() {
var id = $(this).attr("data-id");
debugger;
var url = '@Url.Action("EditarContato","ContatoG", new{area= "Gerencial"})';
$("#editarContato").load(url +"?id=" + id,
function() {
$("#editarContato").modal();
});
}
</script>
<tr onclick="EditarContato()" data-id="@item.ContadoId">
<td>@item.Responsavel</td>
<td>@item.Funcao</td>
<td>@item.Celular</td>
<td>@item.Telefone</td>
<td>@item.Whatsapp</td>
</tr>
id is always coming null, someone knows tell me what I’m doing wrong?
Perfect, thank you, that’s exactly what it was!
– Rafael Passos