Q:

How to load a partial view in a new window?

I have an MVC partial view. I try to load it using window.open by calling the controller name and the action name. I got from the action the related partial view back but there are no links to stylesheets and scripts because this is a new window. How can I fix this issue please?
This is the javascript code I´m using:
 function OpenNewWindowForDetail(model) {
    $.ajax({
        url: '@Url.Action("ActionName", "ControllerName")',
        dataType: 'html',
        data: { 
              userid: model.UserId
        },
        type: 'POST',
        success: function (data) {
            var win = window.open('about:blank');
            with (win.document) {
                open();
                write(data);
                close();
            }

        }
    });

}

All links to stylesheet files and javascript files are in the layout.cshtml by the way.
Thank you in advance

A:

You should modify your action to regular view with layout, instead of partial view. There is no reason to use partial view in this situation.
There is also no reason to use AJAX. Simple anchor with target='_blank' would be enough. userId can be passed by GET parameter.

