3
I have the following button:
<button class="btn btn-default details" data-id="@fornecedores.Codigo"><i class="glyphicon glyphicon-file"></i></button>
On the same page I have the following script:
$(document).ready(function () {
$(".details").click(function () {
var id = $(this).attr("data-id");
$("#modal").load("Detalhes?id=" + id, function () {
$("modal").modal('show');
})
});
})
When I give Click look at the message that appears:
This example I took this link: http://www.linhadecodigo.com.br/artigo/3686/aspnet-mvc-e-bootstrap-exibindo-views-modais.aspx
Includes so are not recommended, especially because ASP.NET MVC has its own minification mechanism. It is better to install by Nuget and use the
BundleConfig
to minify.– Leonel Sanches da Silva
Thanks for the answer, it helped me a lot... I have one more problem related to this question. I have a <div> that loads my modal. When I give get my div is empty, but when the event occurs click to <div> receives the modal information, but it does not appear on the screen.
– user31040
I improved the answer.
– henriquedpereira