Load a partial view in jquery dialog box

sam
sam
134 Points
62 Posts

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

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

Share:   fb twitter linkedin
Answers
Brian
Brian
Participant
570 Points
75 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