System.Web.Routing Namespace

System.Web.Routing 命名空間 (Namespace) 提供與 URL 路由一起使用的類別 (Class),可以讓您使用未對應至實體檔案的 URL。 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

做為多個類別的基底類別 (Base Class),這些類別讓您能自訂 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 參數值是否對條件約束 (Constraint) 有效。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.