Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetActionPath Method

MetaModel.GetActionPath Method

Returns the action path that is associated with a specific table.

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

Public Function GetActionPath ( _
	tableName As String, _
	action As String, _
	row As Object _
) As String


Type: System.String

The name of the table that the action applies to.

Type: System.String

The action to apply to the table.

Type: System.Object

An object that represents a single row of data in a table. row is used to provide values for query-string parameters.

Return Value

Type: System.String
The URL that is associated with the route.

The route is determined by the combination of the table name and action.

Run an online example of this feature.

The following example shows how to use the GetActionPath(String, String, Object) method to evaluate the routing path (determine the URL) for a specified table. For a complete example, see MetaModel.

' Get the registered action path. 
Public Function EvaluateActionPath() As String 
    Dim tableName As String = LinqDataSource1.TableName

    Dim model As MetaModel = GetModel(False)

    Dim actionPath As String = model.GetActionPath(tableName, System.Web.DynamicData.PageAction.List, GetDataItem())
    Return actionPath
End Function

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5 SP1
© 2015 Microsoft