QueryExtender Web Server Control Declarative Syntax
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
The QueryExtender Web server control is used to specify data filtering in a Web page by using declarative syntax. The control enables data from a data source to be filtered without an explicit Where clause in the data source.
<asp:QueryExtender
EnableViewState="True|False"
ID="string"
OnDataBinding="DataBiding event handler"
OnDisposed="Disposed event handler"
OnInit="Init event handler
OnLoad="Load event handler"
OnPreRender="PreRender event handler"
OnUnload="UnLoad event hadler"
Runat="server"
TargetControlID="string"
Visible="True|False"
>
<asp:ControlFilterExpression
ControlD="string"
Column="string">
</asp:ControlFilterExpression>
<asp:DynamicFilterExpression
ControlD="string"
</asp:DynamicFilterExpression>
<asp:CustomExpression="string"
OnQuerying="OnQerying event handler">
</asp:CustomExpression>
<asp:OrderByExpression="string"
DataField="string"
Direction="string">
<asp:ThenByExpression
DataField="string"
Direction="string"
</asp:ThenBy>
</asp:OrderByExpression>
<asp:PropertyExpression="string">
<!-- child controls -->
</asp:PropertyExpression
>
<asp:RangeExpression="integer"
Datafield="string"
MaxType="Exclusive|Inclusive|None"
MinType="Exclusive|Inclusive|None">
<!--child controls-->
</asp:RangeExpression>
<asp:SearchExpression="string"
ComparisonType="CurrentCulture|CurrentCultureIgnoreCase|
InavariantCulture|InvariantCultureIgnoreCase|
Ordinal|OrdinalIgnoreCase"
DataField="string"
SearchType="Contains|EndsWith|StartsWith">
<!--child controls-->
</asp:SearchExpression>
</asp:QueryExtender>
The QueryExtender control provides richer expression syntax for filtering data in a Web page than using a Where clause alone. The QueryExtender control supports EntityDataSource and LinqDataSource data controls, and can support data source controls that implement the IQueryable<T> interface.
The QueryExtender control supports a variety of filter options, which includes searching for strings, searching a range of values, comparing a value to a property in a table, and custom queries. For more information, see QueryExtender Web Server Control Overview.
Note
|
|---|
|
The ControlFilterExpression and DynamicFilterExpression classes are supported only in ASP.NET Dynamic Data Web sites. For more information about the ControlFilterExpression class, see How to: Filter Table Rows Using Values from a Parent Table in Dynamic Data. For information about how to use the DynamicFilterExpression class, see How to: Filter Table Rows Using Values from a Parent Table in Dynamic Data. |
Note