ReportController.cs
[HttpGet] public async Task<ActionResult> Report() { var model = await GetRMschools(User.Identity.Name); return View(model); } [HttpGet] public async Task<List<RMschool>> GetRMschools(string _schoolID) { Account account = new Account("chr_coko.pto@mail.ru", "***"); var api = new MailRuCloud(); api.Account = account; var items = await api.GetItems($@"/Reports/{_schoolID}"); school school_current = schoolRepository.GetT(_schoolID); List<RMschool> model = new List<RMschool>(); foreach (var file_name in items.Files) //eg file_name = "0001_201636.zip" { int report_code = Convert.ToInt32(file_name.Name.Substring(5, 6)); //eg report_code = 201636 var ob = monit95Context.ReportMetas.Find(report_code); model.Add(new RMschool { code = ob.code, name = ob.name, ProjectName = ob.ProjectName, year = ob.year, WWWref = $@"{school_current.ReportLink}/{file_name.Name}" }); } return model; } Report.cshtml
@model IEnumerable<Monit95App.Models.RMschool> <h2>Отчеты</h2> @{ Html.RenderPartial("_GetRMschools", Model);} _GetRMschools.cshtml
@model IEnumerable<Monit95App.Models.RMschool> <body> <table class="table"> <thead class="thead-inverse"> <tr> <th>Проект</th> <th>Отчет</th> <th>Учебный год</th> </tr> </thead> @foreach (var reportMeta in Model.OrderByDescending(x => x.code)) { <tr> <td>@reportMeta.ProjectName</td> <td><a href="@reportMeta.WWWref">@reportMeta.name</a></td> <td>@reportMeta.year</td> </tr> } </table> </body> And now the question starts from here):
Schools.cshtml
<body> <h4>Выбор</h4> <table> <tr> <td> <label>Район:</label> </td> <td> @Html.DropDownListFor(x => x.AreaNames, Model.AreaNames, "--Выбрать--", new { @id = "ddlArea" }) </td> </tr> <tr> <td> <label>Образовательная организация:</label> </td> <td id="School"> @Html.DropDownListFor(x => x.SchoolNames, new List<SelectListItem>(), "--Выбрать--", new { @id = "ddlSchool" }); </td> </tr> </table> <hr /> <ul class="nav nav-tabs"> <li id="li_1"><a href="#">Реквизиты</a></li> <li>@Ajax.ActionLink("Отчеты", "Report", "Report", new {_schoolID = User.Identity.Name }, new AjaxOptions { UpdateTargetId = "tabContent" }) </li> </ul> <div id="tabContent"> </div> ... I need the result of the AJAX link to be placed in the <div id=tabContext> preserving the above information. Instead, it calls the pure result of the Report.cshtml view:
WHAT AM I DOING WRONG?

