1
On the site I am doing has the need that when it is clicked on a table row it redirects to another page, but the line id’s are dynamic, because each line should redirect to a page that shows more information.
My View:
@foreach (projeto1.Entidade.PessoaEntidade item in Model)
{
<tr id="[email protected]">
<td id="[email protected]" style="width:10%">
@item.id
</td>
<td style="width:40%">
@item.Nome
</td>
<td style="width:40%">
@item.Sobrenome
</td>
<td style="width:10%">
<input type="button" value="Alterar" id="partionalViewUpdate" onclick="Teste(@item.id)" />
</td>
</tr>
My Script:
$(document).ready(function () {
$("tr").click(function () {
alert("Clicado");
});
});
@Marconi did not understand the solution, I am still inexperienced in programming :P but thanks for the help
– Helder Alves