MetaModel.GetActionPath(String, String, Object) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the action path that is associated with a specific table.
public:
System::String ^ GetActionPath(System::String ^ tableName, System::String ^ action, System::Object ^ row);
public:
virtual System::String ^ GetActionPath(System::String ^ tableName, System::String ^ action, System::Object ^ row);
public string GetActionPath (string tableName, string action, object row);
member this.GetActionPath : string * string * obj -> string
abstract member GetActionPath : string * string * obj -> string
override this.GetActionPath : string * string * obj -> string
Public Function GetActionPath (tableName As String, action As String, row As Object) As String
- tableName
- String
The name of the table that the action applies to.
- action
- String
The action to apply to the table.
- row
- Object
An object that represents a single row of data in a table. row
is used to provide values for query-string parameters.
The URL that is associated with the route.
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 =
model.GetActionPath(tableName,
System.Web.DynamicData.PageAction.List, GetDataItem());
return actionPath;
}
' 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
The route is determined by the combination of the table name and action.
Run an online example of this feature.
Product | Versions |
---|---|
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: