System.Web.Routing 命名空间

System.Web.Routing 命名空间提供用于 URL 路由的类,通过该类可以使用不映射到物理文件的URLs 。 The System.Web.Routing namespace provides classes that are used with URL routing, which enables you to use URLs that do not map to a physical file.

HttpMethodConstraint

用于在 ASP.NET 路由确定 URL 是否匹配路由时定义所允许的 HTTP 谓词。Enables you to define which HTTP verbs are allowed when ASP.NET routing determines whether a URL matches a route.

PageRouteHandler

提供用于定义如何将 URL 映射到物理文件的属性和方法。Provides properties and methods for defining how a URL maps to a physical file.

RequestContext

封装与所定义路由匹配的 HTTP 请求的相关信息。Encapsulates information about an HTTP request that matches a defined route.

Route

提供用于定义路由及获取路由相关信息的属性和方法。Provides properties and methods for defining a route and for obtaining information about the route.

RouteBase

用作表示 ASP.NET 路由的所有类的基类。Serves as the base class for all classes that represent an ASP.NET route.

RouteCollection

为 ASP.NET 路由操作提供路由的集合。Provides a collection of routes for ASP.NET routing.

RouteData

封装有关路由的信息。Encapsulates information about a route.

RouteTable

存储应用程序的 URL 路由。Stores the URL routes for an application.

RouteValueDictionary

表示不区分大小写的键/值对的集合,您可以在路由框架中的不同位置(例如,在定义路由的默认值时或在生成基于路由的 URL 时)使用该集合。Represents a case-insensitive collection of key/value pairs that you use in various places in the routing framework, such as when you define the default values for a route or when you generate a URL that is based on a route.

StopRoutingHandler

提供一种方式,来指定 ASP.NET 路由不应处理 URL 模式的请求。Provides a way to specify that ASP.NET routing should not handle requests for a URL pattern.

UrlRoutingHandler

用作使您能够自定义 ASP.NET 路由如何处理请求的类的基类。Serves as base class for classes that enable you to customize how ASP.NET routing processes a request.

UrlRoutingModule

匹配定义的路由的 URL 请求。Matches a URL request to a defined route.

VirtualPathData

表示有关路由和虚拟路径的信息,该路由和虚拟路径是在使用 ASP.NET 路由框架生成 URL 时产生的。Represents information about the route and virtual path that are the result of generating a URL with the ASP.NET routing framework.

接口

IRouteConstraint

定义类必须实现才能检查某 URL 参数值是否对约束有效的协定。Defines the contract that a class must implement in order to check whether a URL parameter value is valid for a constraint.

IRouteHandler

定义类必须实现才能处理匹配路由模式的请求的协定。Defines the contract that a class must implement in order to process a request for a matching route pattern.

枚举

RouteDirection

指示 ASP.NET 路由正处理来自客户端的 URL 还是正在生成 URL。Indicates whether ASP.NET routing is processing a URL from a client or generating a URL.