You are developing 3n ASP.NET Web page.
The page includes the following EntityDataSource control.
<asp:EntityDataSource ID=”EntityDataSourcel” runat=”server”
ConnectionString=”name=AdventureWorksEntities”
DefaultContainerName=”AdventureWorksEntities” EnableFlattening= “False” EntitySetName=”Products” />
The page must filter the data that is displayed in a grid based on a query string parameter named ProductPrefix. The grid must display products whose ProductName starts with the query string value.
You need to ensure that the page generates the appropriate database query.
What should you do?
A.
Add the following element to the EntityDataSource control.
<WhereParameters>
<asp:DynamicQueryStringParameter
QueryStringField=”ProductPrefix” Name=”ProductName” />
</WherePararaeters>
B.
Add the following element to the EntityDataSource control.
<WhereParameters>
<asp:DynamicQueryStringParameter
QueryStringField=”ProductPrefix” Name=”ProductName” />
</WhereParameters>
C.
Add the following control after the EntityDataSource control.
<asp :QueryExtender ID= “QueryExtender1″ runat=”server”
TargetControlID=”EntityDataSource1″>
<asp:PropertyExpression Name=”Product Name” />
<asp:DynamicFilterExpression ControlID=”ProductPrefix” />
</asp:QueryExtender>
D.
Add the following control after the EntityDataSource control.
<asp:QueryExtender ID=”QueryExtender1″ runat=” server”
TargetControlID=”EntityDataSource1″>
<asp:SearchExpression SearchType=”StartsWith”
DataFields=”ProductName”>
<asp:QueryStringFarameter
QueryStringField=”ProductPrefix” />
</asp: SearchExpression>
</asp:QueryExtender>