MethodExpression.MethodName 屬性

定義

取得或設定包含自訂 LINQ 查詢的方法名稱。

public:
 property System::String ^ MethodName { System::String ^ get(); void set(System::String ^ value); };
public string MethodName { get; set; }
member this.MethodName : string with get, set
Public Property MethodName As String

屬性值

包含自訂 LINQ 查詢的方法名稱。

範例

以下範例說明如何在控制項FilterStandardPrice中指定QueryExtender該方法。 自訂的 LINQ 查詢是以方法定義 FilterStandardPrice 的。

<asp:QueryExtender ID="QueryExtender1" runat="server"
    TargetControlID="LinqDataSource1">
  <asp:MethodExpression MethodName="FilterStandardPrice">
  </asp:MethodExpression>
  </asp:QueryExtender>

備註

這個 MethodExpression 物件讓你能夠呼叫一個以方法定義的自訂 LINQ 查詢。 你可以在 QueryExtender 頁面的控制項中指定方法。

適用於