@Html.ActionLink("Edit", "EditDetails", "Admin", new { CompanyID = @item.Company_Id }, new { @class = "edit_link" }) @Html.ActionLink("Detail", "CompanyDetails", "Admin", new { CompanyID = @item.Company_Id }, new { @class = "details-modal" }) <div id="my-dialog" title="Company Details"> </div> <div id="edit-dialog" title="Edit Details"> </div> <script type="text/javascript"> $(document).ready(function () { $('#my-dialog').dialog({ autoOpen: false, width: 600, height: 600, resizable: false, modal: true }); $('#edit-dialog').dialog({ autoOpen: false, width: 600, height: 600, resizable: false, modal: true }); $(".edit_link").click(function (e) { //e.preventDefault(); $('#edit-dialog').load($(this).attr('href'),function (){ $('#edit-dialog').dialog('open'); }); e.preventDefault(); }); $('.details-modal').click(function (e) { var theURL = $(this).attr('href'); $('#my-dialog').load(theURL, function () { $(this).dialog('open'); // e.preventDefault(); }); e.preventDefault(); }); }); </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)