以下是 Global.asax 中添加的代码:
protected void Application_Start(object sender, EventArgs e)
{
RegisterRouters(RouteTable.Routes);
}
private void RegisterRouters(RouteCollection route)
{
route.MapPageRoute("home", "index.aspx", "~/Core/Home/index.aspx");
}
在Global.asax中注册路由
本文详细介绍了如何在Global.asax中实现路由注册,包括使用MapPageRoute方法配置默认路由。


被折叠的 条评论
为什么被折叠?



