Which code segment should you insert at line 03?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
The application has a Web form file named MovieReviews.aspx.
The MovieReviews.aspx file connects to a LinqDataSource DataSource named LinqDataSource1 that has a primary key named MovieID.
The application has a DetailsView control named DetailsView1.
The MovieReviews.aspx file contains the following code fragment. (Line numbers are included for reference only.)

01 <asp:DetailsView ID="DetailsView1" runat="server"
02 DataSourceID="LinqDataSource1"
03
04 />
05 <Fields>
06 <asp:BoundField DataField="MovieID" HeaderText="MovieID"
07 InsertVisible="False"
08 ReadOnly="True" SortExpression="MovieID" />
09 <asp:BoundField DataField="Title" HeaderText="Title"
10 SortExpression="Title" />
11 <asp:BoundField DataField="Theater" HeaderText="Theater"
12 SortExpression="Theater" />
13 <asp:CommandField ShowDeleteButton="false"
14 ShowEditButton="True" ShowInsertButton="True" />
15 </Fields>
16 </asp:DetailsView>

You need to ensure that the users can insert and update content in the DetailsView1 control.
You also need to prevent duplication of the link button controls for the Edit and New operations.
Which code segment should you insert at line 03?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
The application has a Web form file named MovieReviews.aspx.
The MovieReviews.aspx file connects to a LinqDataSource DataSource named LinqDataSource1 that has a primary key named MovieID.
The application has a DetailsView control named DetailsView1.
The MovieReviews.aspx file contains the following code fragment. (Line numbers are included for reference only.)

01 <asp:DetailsView ID="DetailsView1" runat="server"
02 DataSourceID="LinqDataSource1"
03
04 />
05 <Fields>
06 <asp:BoundField DataField="MovieID" HeaderText="MovieID"
07 InsertVisible="False"
08 ReadOnly="True" SortExpression="MovieID" />
09 <asp:BoundField DataField="Title" HeaderText="Title"
10 SortExpression="Title" />
11 <asp:BoundField DataField="Theater" HeaderText="Theater"
12 SortExpression="Theater" />
13 <asp:CommandField ShowDeleteButton="false"
14 ShowEditButton="True" ShowInsertButton="True" />
15 </Fields>
16 </asp:DetailsView>

You need to ensure that the users can insert and update content in the DetailsView1 control.
You also need to prevent duplication of the link button controls for the Edit and New operations.
Which code segment should you insert at line 03?

A.
AllowPaging="false" AutoGenerateRows="false"

B.
AllowPaging="true" AutoGenerateRows="false" DataKeyNames="MovieID"

C.
AllowPaging="true" AutoGenerateDeleteButton="false" AutoGenerateEditButton="true" AutoGenerateInsertButton="true" AutoGenerateRows="false"

D.
AllowPaging="false" AutoGenerateDeleteButton="false" AutoGenerateEditButton="true" AutoGenerateInsertButton="true" AutoGenerateRows="false" DataKeyNames="MovieID"



Leave a Reply 0

Your email address will not be published. Required fields are marked *