问题详情

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You create a Web page to display photos and captions. The caption of each photo in the database can be modified by using the application. You write the following code fragment.   English  Chinese  Japan  Korean  - 123 - Test Information Co., Ltd. All rights reserved. <asp:FormView DataSourceID="ObjectDataSource1" DataKeyNames="PhotoID" runat="server"> <EditItemTemplate>  <asp:TextBox Text=’<%# Bind("Caption") %>’ runat="server"/>  <asp:Button Text="Update" CommandName="Update" runat="server"/>  <asp:Button Text="Cancel" CommandName="Cancel" runat="server"/>  </EditItemTemplate> <ItemTemplate>  <asp:Label Text=’<%# Eval("Caption") %>’ runat="server" />  <asp:Button Text="Edit" CommandName="Edit" runat="server"/>  </ItemTemplate>  </asp:FormView>  When you access the Web page, the application throws an error.  You need to ensure that the application successfully updates each caption and stores it in the database.  What should you do? ()


A、Add&ensp;the&ensp;ID&ensp;attribute&ensp;to&ensp;the&ensp;Label&ensp;control.

B、Add&ensp;the&ensp;ID&ensp;attribute&ensp;to&ensp;the&ensp;TextBox&ensp;control.

C、Use&ensp;the&ensp;Bind&ensp;function&ensp;for&ensp;the&ensp;Label&ensp;control&ensp;instead&ensp;of&ensp;the&ensp;Eval&ensp;function.

D、Use&ensp;the&ensp;Eval&ensp;function&ensp;for&ensp;the&ensp;TextBox&ensp;control&ensp;instead&ensp;of&ensp;the&ensp;Bind&ensp;function.

时间:2022-08-08 18:54 关键词: MCPD(70-562)

答案解析

B
相关问题