MetaModel.GetActionPath(String, String, Object) Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Restituisce il percorso dell'azione associato a una tabella specifica.
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
Parametri
- tableName
- String
Nome della tabella a cui si applica l'azione.
- action
- String
Azione da applicare alla tabella.
- row
- Object
Oggetto che rappresenta una singola riga di dati in una tabella.
row viene usato per fornire valori per i parametri di stringa di query.
Valori restituiti
URL associato alla route.
Esempio
Nell'esempio seguente viene illustrato come usare il GetActionPath(String, String, Object) metodo per valutare il percorso di routing (determinare l'URL) per una tabella specificata. Per un esempio completo, vedere 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
Commenti
La route è determinata dalla combinazione del nome e dell'azione della tabella.