MVC运行报错
报错信息:
The view 'Index' or its master was not found. The following locations were searched:
~/Views/CreateImage/Index.aspx
~/Views/CreateImage/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.InvalidOperationException: The view 'Index' or its master was not found. The following locations were searched:
~/Views/CreateImage/Index.aspx
~/Views/CreateImage/Index.ascx
~/Views/Shared/Index.aspx
~/Views/Shared/Index.ascx
Global文件配置信息如下:
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "CreateImage", action = "Index", id = UrlParameter.Optional }
);
CreateImageController的Action部分:
public ActionResult Index()
{
return View();
}
页面Form部分:
<% Html.BeginForm("Index", "CreateImage", FormMethod.Post); %>
<%Html.EndForm(); %>
小弟初识net MVC请大家多多指教!!