【发布时间】:2015-09-04 06:32:25
【问题描述】:
我需要链接是这种格式http://localhost:32136/username/HomePage
例如:-https://www.facebook.com/xxxyyyy
请给我建议如何构建 URL 的链接。我已将 route.config 配置为
routes.MapRoute(
name: "Profile",
url: "{username}",
defaults: new { controller = "Account", action = "Profile" },
constraints: new { username = "Vinoth" }
);
【问题讨论】:
-
您将使用哪个列表?你能在这里放更多代码吗?
-
localhost:32136/username/HomePage 用户名将是vinoth 例如怎么做
-
我认为这是 URL,您将从列表中获取记录?
-
请重新检查我的问题现在是否已编辑..
标签: asp.net routing url-routing