I'm trying to load a .CSHTML file using jQuery AJAX functionality. I have a small database application and I'm using DNN's Razor Host module. I want to avoid page load flicker and have the application fully loaded before it is displayed. I've tried the following, which works for standard .HTML files, but not for .CSHTML files. I get no errors when using this code, but nothing displays. Any help would be appreciated.
<html
lang="en">
<head>
<meta
charset="utf-8" />
<title>Razor
AJAX</title>
<script>
$(function () {
$('#MyContent').load('/_MyFile.cshtml');
})
</script>
</head>
<body>
<div
id="MyContent">
</div>
</body>
</html>