Asp.net mvc 4 System.InvalidOperationException:未找到部分视图“\u Reservation”,或者没有视图引擎支持搜索的位置

Asp.net mvc 4 System.InvalidOperationException:未找到部分视图“\u Reservation”,或者没有视图引擎支持搜索的位置,asp.net-mvc-4,Asp.net Mvc 4,在我的MVC4应用程序中,我试图使用Ajax表单实现对我的“预订”存储库的搜索 我的视图:视图/预订/索引: @model IEnumerable<RentalsForceProject.Models.Reservation> @{ ViewBag.Title = "Reservations Center"; ViewBag.current = "Reservation"; } @section featured { @Html.Partial("_Na

在我的MVC4应用程序中,我试图使用Ajax表单实现对我的“预订”存储库的搜索

我的视图:视图/预订/索引:

@model IEnumerable<RentalsForceProject.Models.Reservation>

@{
    ViewBag.Title = "Reservations Center";
    ViewBag.current = "Reservation";
}

@section featured { 
    @Html.Partial("_Navigator")
}

@using (Ajax.BeginForm(
    new AjaxOptions
    {
        HttpMethod = "get",
        InsertionMode = InsertionMode.Replace,
        UpdateTargetId = "ReservaionList"
    }))
{
    <input type="search" name="searchTerm" />
    <input type="submit" name="Search By Contact" />
}

<p>
    <input type="button" value="Create New" class="greenButton" style="margin-top:20px;" onclick="location.href='@Url.Action("Create", "Reservation")'"/>
</p>

@Html.Partial("_Reservation", Model)
当我按下“搜索”按钮时,我可以看到它为局部视图创建了一个必要的模型,但视图中什么也没有发生。 我尝试使用Chrome开发者工具->F12-网络选项卡,发现了以下异常:

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: The partial view '_Reservaion' was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Reservation/_Reservaion.aspx
~/Views/Reservation/_Reservaion.ascx
~/Views/Shared/_Reservaion.aspx
~/Views/Shared/_Reservaion.ascx
~/Views/Reservation/_Reservaion.cshtml
~/Views/Reservation/_Reservaion.vbhtml
~/Views/Shared/_Reservaion.cshtml
~/Views/Shared/_Reservaion.vbhtml

有什么想法吗?

“预订”和“预订”。
public ActionResult Index(string searchTerm = null)
{
    if (unitOfWork.currentClient == null)
    {
        return RedirectToAction("LogOn", "Account");
    }
    else
    {
        ViewBag.currentClient = unitOfWork.currentClient;

        if (Request.IsAjaxRequest() && searchTerm != null)
            return PartialView("_Reservaion", unitOfWork.currentClient.getAllReservationsBySearchTerm(searchTerm));

         return View(unitOfWork.currentClient.getAllReservations());
    }  
}
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: The partial view '_Reservaion' was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/Reservation/_Reservaion.aspx
~/Views/Reservation/_Reservaion.ascx
~/Views/Shared/_Reservaion.aspx
~/Views/Shared/_Reservaion.ascx
~/Views/Reservation/_Reservaion.cshtml
~/Views/Reservation/_Reservaion.vbhtml
~/Views/Shared/_Reservaion.cshtml
~/Views/Shared/_Reservaion.vbhtml