MetaModel.GetActionPath(String, String, Object) 方法

定义

返回与特定表关联的操作路径。

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

操作应用于的表的名称。

action
String

要应用于表的操作。

row
Object

一个对象,表示表中的单个数据行。 row 用于提供查询字符串参数的值。

返回

与路由关联的 URL。

示例

以下示例演示如何使用 GetActionPath(String, String, Object) 该方法评估指定表的路由路径(确定 URL)。 有关完整示例,请参阅 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

注解

路由由表名称和操作的组合决定。

适用于