以下是 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");
}