Question:
You are developing a Web application. You add a SqlDataSource Web control named EmployeeSqlDataSource. You change the DataSource property of the EmployeeSqlDataSource control to a Microsoft SQL Server database table named Employees that contains all employees.
You have the following requirements:
Ensure that the Web application allows inline editing of employee data. Ensure that you can control the markup rendered by Web controls. Ensure that multiple records can be shown on each page and that you can page through the data records.
You need to add a code segment that meets the requirements. Which code segment should you use? (More than one answer choice may achieve the goal. Select the BEST answer.)
A
<asp:Repeater ID="EmployeeRepeater" runat="server" DataSourceID="EmployeeSqlDataSource"> <ItemTemplate>& </ItemTemplate>
</asp:Repeater>
<asp:DataList ID="EmployeeDataList" runat="server" DataKeyField="EmployeeId" DataSourceID="EmployeeSqlDataSource">
<ItemTemplate>& </ItemTemplate>
<EditItemTemplate>& </EditItemTemplate>
</asp:DataList>
B
<asp:FormView ID="EmployeeFormView" runat="server" AllowPaging="True"
DataSourceID="EmployeeSqlDataSource" EnableModelValidation="True"> <ItemTemplate>& </ItemTemplate>
<EditItemTemplate>& </EditItemTemplate>
<PagerTemplate>& </PagerTemplate>
</asp:FormView>
C
<asp:ListView ID="EmployeeListView" runat="server" DataSourceID="EmployeeSqlDataSource" EnableModelValidation="True">
&
</asp:ListView>
<asp:DataPager ID="EmployeeDataPager" runat="server" PagedControlID="EmployeeListView" > <Fields>
D
<asp:NextPreviousPagerField ButtonType="Button"
ShowFirstPageButton="True"
ShowLastPageButton="True" />
</Fields>
</asp:DataPager>
+ AnswerD
+ Report