DynamicDataRoute DynamicDataRoute DynamicDataRoute DynamicDataRoute Class

定義

表示 ASP.NET Dynamic Data 所使用的路徑。Represents a route that is used by ASP.NET Dynamic Data.

public ref class DynamicDataRoute : System::Web::Routing::Route
public class DynamicDataRoute : System.Web.Routing.Route
type DynamicDataRoute = class
    inherit Route
Public Class DynamicDataRoute
Inherits Route
繼承
DynamicDataRouteDynamicDataRouteDynamicDataRouteDynamicDataRoute

備註

您可以使用路由來設定動態資料行為。You use routes to configure Dynamic Data behavior.

RouteTable類型的靜態Routes屬性會保存路由的集合。The static Routes property of the RouteTable type holds a collection of routes. 針對動態資料, 在 global.asax 檔案的Routes Application_Start事件中, 通常會將一或多個路由註冊 (新增至屬性)。For Dynamic Data, one or more routes are typically registered (added to the Routes property) in the Application_Start event in the Global.asax file. 例如, 路由會決定資料列的詳細資訊是否應該顯示在與資料列清單相同的頁面上。For example, routes determine whether the details for a row of data should be shown on the same page as the list of rows. 他們也可以決定是否要在與某些資料表的資料列清單相同的頁面上顯示詳細資料, 而不是其他資料表。They can also determine whether details should appear on the same page as the list of rows for some tables but not others.

您可以設定ActionViewNameTableModel屬性, 並在此Route函式中提供 URL 的模式。You set the Action, ViewName, Table, and Model properties and provide a pattern for the URL in the Route constructor.

動態資料會使用您提供的 URL 模式來符合要求的 URL 模式, 並建立 Url。Dynamic Data uses the URL pattern that you provide to match URL patterns for requests and to create URLs. 如需詳細資訊,請參閱DynamicDataRouteFor more information, see DynamicDataRoute.

建構函式

DynamicDataRoute(String) DynamicDataRoute(String) DynamicDataRoute(String) DynamicDataRoute(String)

使用指定的 URL 模式,初始化 DynamicDataRoute 類別 (Class) 的新執行個體 (Instance)。Initializes a new instance of the DynamicDataRoute class by using the specified URL pattern.

屬性

Action Action Action Action

取得或設定路徑的動作名稱。Gets or sets the name of an action for a route.

Constraints Constraints Constraints Constraints

取得或設定運算式的字典,這些運算式指定 URL 參數的有效值。Gets or sets a dictionary of expressions that specify valid values for a URL parameter.

(Inherited from Route)
DataTokens DataTokens DataTokens DataTokens

取得或設定傳遞至路徑處理常式但並未用來判斷路徑是否符合特定 URL 模式的自訂值。Gets or sets custom values that are passed to the route handler, but which are not used to determine whether the route matches a URL pattern.

(Inherited from Route)
Defaults Defaults Defaults Defaults

取得或設定要在 URL 不包含所有參數時使用的值。Gets or sets the values to use if the URL does not contain all the parameters.

(Inherited from Route)
Model Model Model Model

取得或設定路徑套用的資料模型。Gets or sets the data model to which the route applies.

RouteExistingFiles RouteExistingFiles RouteExistingFiles RouteExistingFiles

取得或設定值,指出 ASP.NET 路由是否應該處理符合現有檔案的 URL。Gets or sets a value that indicates whether ASP.NET routing should handle URLs that match an existing file.

(Inherited from RouteBase)
RouteHandler RouteHandler RouteHandler RouteHandler

取得或設定處理路徑要求的物件。Gets or sets the object that processes requests for the route.

Table Table Table Table

取得或設定路徑的資料表名稱。Gets or sets the name of the table for the route.

Url Url Url Url

取得或設定路徑的 URL 模式。Gets or sets the URL pattern for the route.

(Inherited from Route)
ViewName ViewName ViewName ViewName

取得或設定與路徑相關聯的 .aspx 頁面名稱。Gets or sets the name of the .aspx page that is associated with a route.

方法

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetActionFromRouteData(RouteData) GetActionFromRouteData(RouteData) GetActionFromRouteData(RouteData) GetActionFromRouteData(RouteData)

從目前 Dynamic Data Web 要求的 RouteData 物件傳回動作。Returns the action from the RouteData object for the current Dynamic Data Web request.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetRouteData(HttpContextBase) GetRouteData(HttpContextBase) GetRouteData(HttpContextBase) GetRouteData(HttpContextBase)

傳回特定 Web 要求的路由資訊。Returns routing information for a specific Web request.

GetTableFromRouteData(RouteData) GetTableFromRouteData(RouteData) GetTableFromRouteData(RouteData) GetTableFromRouteData(RouteData)

識別與 Dynamic Data 網頁要求相關聯的資料表。Identifies the table that is associated with a Dynamic Data Web page request.

GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
GetVirtualPath(RequestContext, RouteValueDictionary) GetVirtualPath(RequestContext, RouteValueDictionary) GetVirtualPath(RequestContext, RouteValueDictionary) GetVirtualPath(RequestContext, RouteValueDictionary)

傳回路徑 (Route) 的虛擬路徑 (Path)。Returns the virtual path of a route.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ProcessConstraint(HttpContextBase, Object, String, RouteValueDictionary, RouteDirection) ProcessConstraint(HttpContextBase, Object, String, RouteValueDictionary, RouteDirection) ProcessConstraint(HttpContextBase, Object, String, RouteValueDictionary, RouteDirection) ProcessConstraint(HttpContextBase, Object, String, RouteValueDictionary, RouteDirection)

判斷參數值是否符合該參數的條件約束。Determines whether a parameter value matches the constraint for that parameter.

(Inherited from Route)
ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

適用於

另請參閱