Я пытаюсь загрузить файл, используя AJAX, который НЕ работает.
Просмотр
@{
ViewBag.Title = "Index";
Layout = null;
}
<html>
<head>
<script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$("button").click(function () {
$("div").load('test1.txt');
});
});
</script>
</head>
<body>
<div><h2>Let AJAX change this text</h2></div>
<button>Change Content</button>
</body>
</html>
Путь к test1.txt: ~ / Views / Ajax / test1.txt
Путь к представлению - ~ / Views / Ajax / Index.cshtml
Есть идеи?