从Ajax调用获取HTML

Been a while since I done this but I must be doing something wrong.

I am using asp.netcore 2.1 I have a view with a button on it. The button makes an ajax call to get the contents of a html page.

But, despite triple checking the uri the console error tells me it cannot find the page with a 404 error. The html page is just a div structure.

this is my ajax call:

 $.ajax({
    type: 'GET',
    url: '/Helper/Dialogs/CreateClient.html',
    dataType : 'html',
    success: function(data) {
        dialogObj.setProperties(
            { content: data }
        );
    }
});

In case people get tripped up by this I was storing my html page in a sub-folder off the root off my solution. Because I am using asp.net core all 'adhoc' content has to be under the wwwroot folder in the solution.

It is obvious to me now but I thought I would post my answer in case people find it useful.