MethodExpression.MethodName 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置包含自定义 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 控件中指定方法。