-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRouteConfig.cs
More file actions
23 lines (21 loc) · 964 Bytes
/
Copy pathRouteConfig.cs
File metadata and controls
23 lines (21 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Routing;
using Microsoft.AspNet.FriendlyUrls;
namespace ARI_POC
{
public static class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.MapPageRoute("RenderItem", "tstpkg/items/{itemfolder}/" + Global.ItemUrlName, "~/RenderItem.aspx");
routes.MapPageRoute("ScoreItem", "tstpkg/items/{itemfolder}/" + Global.ScoreUrlName, "~/ScoreItem.aspx");
routes.Add("ItemResources", new Route("tstpkg/items/{itemfolder}/res/{*respath}", new TransmitResourceHandler()));
routes.Add("CommonResources", new Route("tstpkg/common-res/{*respath}", new TransmitResourceHandler()));
routes.MapPageRoute("Err404", "tstpkg/{*tail}", "~/Err404.aspx"); // Catch all other test package URLs with a 404 error
routes.EnableFriendlyUrls();
}
}
}