QueryExtender Class Usage

Wednesday, 10 February 2010 18:57 by scngan

One of the class that being introduce in ASP.NET 4, QueryExtender.

QueryExtender play the role to filtered data that load from the data source without specify the WHERE clause.

It can control can be use in specifying filtering declarative syntax.

Example:

<asp:LinqDataSource ID="dataSource" runat="server"
    TableName="Products">
</asp:LinqDataSource>
<asp:QueryExtender TargetControlID="dataSource" runat="server">
  <asp:SearchExpression DataFields="ProductName, Supplier.CompanyName"
        SearchType="StartsWith">
    <asp:ControlParameter ControlID="TextBoxSearch" />
  </asp:SearchExpression>
</asp:QueryExtender>

Currently rated 1.0 by 2 people

  • Currently 1/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:   , ,
Categories:   Technical Stuff
Actions:   | E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed
Comments are closed