7
MVC 3无法将字符串作为View的模型传递?
我的模型传递给View时遇到一个奇怪的问题 控制者 [Authorize] public ActionResult Sth() { return View("~/Views/Sth/Sth.cshtml", "abc"); } 视图 @model string @{ ViewBag.Title = "lorem"; Layout = "~/Views/Shared/Default.cshtml"; } 错误讯息 The view '~/Views/Sth/Sth.cshtml' or its master was not found or no view engine supports the searched locations. The following locations were searched: ~/Views/Sth/Sth.cshtml ~/Views/Sth/abc.master //string model is …