Load a partial view in jquery dialog box

sam
sam
378 Points
48 Posts

I am trying to use jquery dialog to open partial view. Please show some example for that.

Views: 9750
Total Answered: 1
Total Marked As Answer: 0
Posted On: 19-Jan-2016 03:11

Share:   fb twitter linkedin
Answers
Brian
Brian
2376 Points
13 Posts
         

Hi Sam,

You can use JQuery dialog as:

<script type="text/javascript">
$(function () {
$('#dvdialog').dialog({
autoOpen:false,
width: 800,
height:600,
resizable:false,
title:'Dialog Box',
modal:true,
open:function (event, ui) {
$(this).load('@Url.Action("ActionName", "ControllerName")');
},
buttons: { 
"Close": function () {
$(this).dialog("close");
}
}
});
});
</script>

 

Posted On: 20-Jan-2016 21:22
 Log In to Chat