Share the joy
use Jquery dialog to open the partial view as popup.
Change in View:
//add class to action link and get the actionlink click using .classname in jquery.
@Html.ActionLink(“link text”, “actionName”, “controllerName”, new {@class=”popupLink”})
<script type=”text/javascript”>
$(function () {
$(‘.popupLink’).click(function () {
$(‘<div id=”popupfooterdiv”/>’).appendTo(‘body’).dialog({
close: function (event, ui) {
dialog.remove();
},
modal: false,
draggable: false,
width: 500,
height: 400,
resizable: false,
//open: function (event, ui) {
// $(‘.ui-dialog-title’).remove();
//}
}).load(this.href, {});
return false;
});
});
</script>
In Controller
[HttpPost]
public ActionResult actionName()
{
return PartialView();
}
Share the joy