У меня есть следующие методы UserController:
public ActionResult DeleteThread(int RootMessageID)
{
_repository.DeleteMessageThread(RootMessageID);
return RedirectToAction("ActionMessageSuccess", new { txt = "Message was sent successfully" });
}
public ActionResult ActionMessageSuccess(string txt)
{
return View(txt);
}
есть страница cshtml (в представлениях \ пользователь):
@model System.String
@{
ViewBag.Title = "SendMessageSuccess";
Layout = "~/Views/Shared/_LayoutUser.cshtml";
}
<h2>@Model</h2>
но я получил:
The view 'Message was sent successfully' or its master was not found or no view engine supports the searched locations. The following locations were searched:
~/Views/User/Message was sent successfully.aspx
~/Views/User/Message was sent successfully.ascx
~/Views/Shared/Message was sent successfully.aspx
~/Views/Shared/Message was sent successfully.ascx
~/Views/User/Message was sent successfully.cshtml
~/Views/User/Message was sent successfully.vbhtml
~/Views/Shared/Message was sent successfully.cshtml
~/Views/Shared/Message was sent successfully.vbhtml
после вызова DeleteThread. Почему?