klasss Posted November 12, 2020 at 05:57 PM Report Share #620124 Posted November 12, 2020 at 05:57 PM Boa tarde, estou a fazer um pequeno projeto em Asp.net MVC onde inicialmente abria uma nova view e com a seguinte função ia buscar o ID . function Editar(id) { window.location.href = "../Funcionario/Registo/" + id; } Atualmente decidi mudar e em vez de abrir uma nova página quero que seja possível fazer o mesmo mas numa modal. Mas estou com dificuldades em encontrar a forma que funcione. Estou a usar o seguinte código para mostrar os dados e acrescentei um botão "Editar" @{ foreach (var item in (List<TarefasModel>)ViewBag.MostrarTarefas) { <tr> <td><button type="button" class="btn btn-warning" data-toggle="modal" data-target="#Modalpopup" onclick="IdModal(@item.Id)">Editar</button></td> <td>@item.Id</td> <td>@item.NomeTarefa</td> <td>@item.Descricao</td> <td>@item.Atribuido</td> <td>@item.DataVencimento</td> <td><button type="button" class="btn btn-success" onclick="Excluir(@item.Id)">Concluido</button></td> </tr> } } Agradeço a quem me puder dar umas dicas Abraço Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now