I'm using a twitter bootstrap model to load my differents views in asp.net mvc, but the modal is only loading once, so if I click in a link the bootstrap modal is showing the right view, but if I then click in another link the modal still showing the previous view and I have to reload the page to click again for showing something different.
These are the links in the caller page:
<a href="/Categorias/Details/@item.IdCategoria" data-toggle="modal" data-target="#pageModal"><span class="glyphicon glyphicon-list-alt"></span> Detalle</a>
<a href="/Categorias/Edit/@item.IdCategoria" data-toggle="modal" data-target="#pageModal"><span class="glyphicon glyphicon-pencil"></span> Editar</a>
This is the modal in the caller page:
<!-- Start - Modal -->
<div class="modal fade" id="pageModal" tabindex="-1" role="dialog" aria-labelledby="pageModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
</div>
</div>
</div>
<!-- End - Modal -->
This is one of the views called by the links:
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">× </button>
<h4 class="modal-title" id="imageModalLabel">@ViewBag.Title</h4>
</div>
<div class="modal-body">
<ul class="list-group">
<li class="list-group-item">@Html.LabelFor(model => model.NombreCategoria)<span class="badge">@Html.DisplayFor(model => model.NombreCategoria)</span>
</li>
</ul>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</div>
Hoping someone can help me. Thanks! :)