Export (0) Print
Expand All

DynamicDataRoute Class

Represents a route that is used by ASP.NET Dynamic Data.

System.Object
  System.Web.Routing.RouteBase
    System.Web.Routing.Route
      System.Web.DynamicData.DynamicDataRoute

Namespace:  System.Web.DynamicData
Assembly:  System.Web.DynamicData (in System.Web.DynamicData.dll)

public class DynamicDataRoute : Route

The DynamicDataRoute type exposes the following members.

  NameDescription
Public methodDynamicDataRouteInitializes a new instance of the DynamicDataRoute class by using the specified URL pattern.
Top

  NameDescription
Public propertyActionGets or sets the name of an action for a route.
Public propertyConstraintsGets or sets a dictionary of expressions that specify valid values for a URL parameter. (Inherited from Route.)
Public propertyDataTokensGets 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.)
Public propertyDefaultsGets or sets the values to use if the URL does not contain all the parameters. (Inherited from Route.)
Public propertyModelGets or sets the data model to which the route applies.
Public propertyRouteExistingFilesGets or sets a value that indicates whether ASP.NET routing should handle URLs that match an existing file. (Inherited from RouteBase.)
Public propertyRouteHandlerGets or sets the object that processes requests for the route.
Public propertyTableGets or sets the name of the table for the route.
Public propertyUrlGets or sets the URL pattern for the route. (Inherited from Route.)
Public propertyViewNameGets or sets the name of the .aspx page that is associated with a route.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetActionFromRouteDataReturns the action from the RouteData object for the current Dynamic Data Web request.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetRouteDataReturns routing information for a specific Web request. (Overrides Route.GetRouteData(HttpContextBase).)
Public methodGetTableFromRouteDataIdentifies the table that is associated with a Dynamic Data Web page request.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodGetVirtualPathReturns the virtual path of a route. (Overrides Route.GetVirtualPath(RequestContext, RouteValueDictionary).)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Protected methodProcessConstraintDetermines whether a parameter value matches the constraint for that parameter. (Inherited from Route.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

You use routes to configure Dynamic Data behavior.

The static Routes property of the RouteTable type holds a collection of routes. 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.

You set the Action, ViewName, Table, and Model properties and provide a pattern for the URL in the Route constructor.

Dynamic Data uses the URL pattern that you provide to match URL patterns for requests and to create URLs. For more information, see DynamicDataRoute.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft