lulu50
asked on
MVC C# popup window is not popping
Hi,
When I click on my link, it takes me to a whole new page instead of opening my partial view page in a popup window.
I’m not sure what I’m doing wrong can you please take a look and let me know
Thanks,
When I click on my link, it takes me to a whole new page instead of opening my partial view page in a popup window.
I’m not sure what I’m doing wrong can you please take a look and let me know
Thanks,
Controller:
public ActionResult RulePartialView()
{
CABRRulePartialViewModel model = new CABRRulePartialViewModel();
return PartialView(model);
}
Index page:
$(document).ready(function () {
$(function () {
$('#dialog').dialog({
autoOpen: false,
width: 400,
height:500,
resizable: false,
title: 'Product',
modal: true,
open: function(event, ui) {
$(this).load("@Url.Action("RulePartialView", "CareAdvanceBusinessRules")");
},
buttons: {
"Close": function () {
$(this).dialog("close");
}
}
});
$("#opener").click(function () {
$("#dialog").dialog("open");
});
});
});
<div id="dialog" title="Basic dialog"> </div>
<a id="opener" href="@Url.Action("RulePartialView", "CareAdvanceBusinessRules")">Click to open popup window </a>
Partial view page
@model BCUW.Model.CABusinessRules.CABRRulePartialViewModel
<p>hello this is the partial view page</p>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you welcome
ASKER
I thank you so much for helping me with this.
It finally works and I can see my dialog box Thank you so much
you're the best!!!!!!!