I have an MVC view from which I want to popup a jQuery dialog. In the dialog, I want to render a view, but the controller action requires a parameter. Here's what I have:
$(document).ready(function () {
$dialog = $('<div></div>')
.dialog({
open: function(event, ui) {
$(this).load("@Url.Action("Edit", "Agenda", new {id = ???})"); //Line to fix
},
autoOpen: false
});
And further down, I have this code calling the dialog. Note that the id I want to pass to the controller action is calEvent.id
$('#calendar').fullCalendar({
eventClick: function (calEvent, jsEvent, view) {
$dialog.dialog('open');
}
});
So the question is: How can I adapt my code to pass calEvent to the id parameter?