代码之家  ›  专栏  ›  技术社区  ›  SilverLight

在地址栏中显示路由的url,而不是主url

  •  0
  • SilverLight  · 技术社区  · 5 年前

    Global.asax 文件:

    protected void Application_Start(object sender, EventArgs e)
    {
        RegisterRoutes(RouteTable.Routes);
    }
    
    static void RegisterRoutes(RouteCollection routes)
    {
        routes.MapPageRoute("Default", "My Home Page", "~/Default.aspx");
    }
    

    现在我想展示 https://www.example.com/My Home Page 给客户打电话 https://www.example.com 在浏览器的地址栏中,按enter键。
    .aspx

    请两个都给我看看 c级# web.config文件


    编辑: 我在里面asp.netweb窗体,而不是核心或MVC
    0 回复  |  直到 5 年前