Asp.net mvc 4 如何使用MVC4或MVC5创建动态路由

Asp.net mvc 4 如何使用MVC4或MVC5创建动态路由,asp.net-mvc-4,dynamic,routes,using,Asp.net Mvc 4,Dynamic,Routes,Using,我试图在routeconfig文件(例如https:domain.com/foldername(schoolname)/controller/page)中设置动态路由,在这里根据学校登录从url获取学校名称 这是我的密码 `routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); string ur = "{controller}/{action}/{id}"; string u1 =

我试图在routeconfig文件(例如https:domain.com/foldername(schoolname)/controller/page)中设置动态路由,在这里根据学校登录从url获取学校名称

这是我的密码

 `routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
  string ur = "{controller}/{action}/{id}";
            string u1 = "{*permalink}";
            routes.MapRoute(
    name: "CmsRoute",
    url: ur+"/"+u1,
    defaults: new { controller = "General", action = "ClassSetting" }`
项目文件夹结构

请帮我怎么做

我试过这个

提前谢谢