码迷,mamicode.com
首页 > 其他好文 > 详细

找到视图“Page”或其母版视图,或没有视图引擎支持搜索的位置。搜索了以下位置:

时间:2014-04-29 10:38:47      阅读:544      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   java   color   io   

将原起始页面View中 Index和 Controller中的HomeController删除后报这样的错误,在global.asax设置好路由后

 

例:

mamicode.com,码迷
public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Page", action = "Page", id = UrlParameter.Optional }, // Parameter defaults
                new string[] { "MvcDemo.Controllers" }  //Controller的命名空间
            );

        }
mamicode.com,码迷

在右键Web项目属性-Web 点选当前页面 保存

错误排除

找到视图“Page”或其母版视图,或没有视图引擎支持搜索的位置。搜索了以下位置:,码迷,mamicode.com

找到视图“Page”或其母版视图,或没有视图引擎支持搜索的位置。搜索了以下位置:

标签:style   blog   http   java   color   io   

原文地址:http://www.cnblogs.com/freemindblog/p/3698760.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!