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 控件中指定方法。

适用于