public ActionResult MeanQ(int id)
{
Access access= db.Access.Find(id);
return PartialView("_MeanQPartial", access);
}
The partial view thats being rendered in the above code is displayed in a Dialog Modal (Jquery)...The link(onclick) that displays the partial view in a Jquery Modal Dialog works well for the first click. Once I close that dialog and click on the link again, the Partial View does not open as expected in a pop up form. It opens as a new page in the browser. How can I make the pop up modal dialog link work the same way every time?
Javascript code is below (Jquery Modal Dialog):
<script type="text/javascript">
$(document).ready(function () {
//initialize the dialog
$("#result").dialog({ width: 400, resizable: true, position: 'center', title: 'Access info', autoOpen: false,
buttons: { "Ok": function () { $(this).dialog("close"); } }
});
});
$(function () {
$('#modal').click(function () {
//load the content from this.href, then turn it into a dialog.
$('#result').load(this.href).dialog('open');
return false;
});
});
HTML Link that triggers the modal dialog:
@Html.ActionLink("PopUp", "MeanQ", new { id = item.AccID }, new { id = "modal" })