This documentation is archived and is not being maintained.

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 string GetActionPath(
	string tableName,
	string action,
	Object row


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 string EvaluateActionPath()
    string tableName = LinqDataSource1.TableName;

    MetaModel model = GetModel(false);

    string actionPath =
            System.Web.DynamicData.PageAction.List, GetDataItem());
    return actionPath;

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

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

.NET Framework

Supported in: 3.5 SP1