无法在asp.net中加载母版页 [英] master page cannot be loaded in asp.net

查看:219
本文介绍了无法在asp.net中加载母版页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无法在visual studio(asp.net)中加载母版页文件

推荐答案

您可能没有进入路径将主页面放入RouteConfig.cs页面。



我使用的是VS-2013,这就是我的RouteConfig.cs页面的样子。



You may not have entered the path of the master page into the RouteConfig.cs page.

I use VS-2013, and this is what my RouteConfig.cs page looks like.

public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Dashboard", id = UrlParameter.Optional }
            );
        }
    }





希望这会有所帮助。



Hope this helps.


这篇关于无法在asp.net中加载母版页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆