Click or drag to resize

IWebPageControllerBuilderUseCustomRoutes Method

Use the given function to configure custom routes for selecting pages.

Namespace: GSF.Web.Hosting
Assembly: GSF.Web (in GSF.Web.dll) Version: 2.4.218-beta
Syntax
IWebPageControllerBuilder UseCustomRoutes(
	Action<HttpRouteCollection> routeConfig
)

Parameters

routeConfig  ActionHttpRouteCollection
Function that configures the custom routes.

Return Value

IWebPageControllerBuilder
The web page controller builder.
Remarks
The routes should set the controller, action, and pageName as in the following example.
C#
routes.MapHttpRoute(
    name: "MyCustomRoute",
    routeTemplate: "my/custom/route",
    defaults: new
    {
        controller = "WebPage",
        action = "GetPage",
        pageName = "Index.html"
    }
);
See Also