Databases Reference
In-Depth Information
ConnectionString=”name=NorthwindEntities” EnableUpdate=”true”
DefaultContainerName=”NorthwindEntities” EntitySetName=”Products” />
<asp:QueryExtender runat=”server” TargetControlID=”dataSource”>
<asp:DynamicFilterExpression ControlID=”categoryFilter” />
</asp:QueryExtender>
</asp:Content>
QueryExtender is a special nonvisual control. Using the TargetControlID property, it is
associated with a LINQ-based data source control, such as the EntityDataSource in this
example or LinqDataSource provided by LINQ to SQL. At run time, the QueryExtender
can modify the LINQ query constructed by the data source control before it is converted
to SQL and sent to the database server for execution. QueryExtender uses one or more
data source expressions . In this example, there is a DynamicFilterExpression associated
with a DynamicFilter control at the top of the page. Before going too much deeper, look
at Figure 1.15, which shows the resulting page at run time.
FIGURE 1.15
QueryExtender and DynamicFilter Sample.
DynamicFilter is a special control provided by Dynamic Data. Based on the column name
specified in its DataField property and the metadata information, it selects and renders
an appropriate filter template where the user can specify search criteria for this column.
Figure 1.16 shows the filter templates available in Dynamic Data projects out of the box.
 
Search WWH ::




Custom Search