I need to call a PartialView in my JavaScript but I'm not sure how.
I'm using a plugin that in the variable TARGET receives a Div. And in my case, this Div I put in being a Partial View. My JS looks like this:
var modal = new Custombox.modal({
content: {
effect: 'blur',
target: '#MinhaDiv',
}
}).open();
The idea would be to do something close to that:
var modal = new Custombox.modal({
content: {
effect: 'blur',
target: @Html.Partial("_Unidade", Model),
}
}).open();
Of course this example will not run because I'm using the helper inside JavaScript. But the example is to convey my need.
So I need JavaScript to load a PartialView and still pass a model to her. Is this possible?