可学答题网 > 问答 > MCPD(70-562)题库
目录: 标题| 题干| 答案| 搜索| 相关
问题

You create a Microsoft


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:   <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?()

  • AAdd the ID attribute to the Label control. 
  • BAdd the ID attribute to the TextBox control. 
  • CUse the Bind function for the Label control instead of the Eval function. 
  • DUse the Eval function for the TextBox control instead of the Bind function.
参考答案
参考解析:
分类:MCPD(70-562)题库
相关推荐

1、You create a Microsoft

You&ensp;create&ensp;a&ensp;Microsoft&ensp;ASP.NET&ensp;application&ensp;by&ensp;using&ensp;the&ensp;Microsoft&ensp;.NET&ensp;Framework&ensp;version&ensp;3.5.&ensp;T...

2、You create a Microsoft

You&ensp;create&ensp;a&ensp;Microsoft&ensp;ASP.NET&ensp;application&ensp;by&ensp;using&ensp;the&ensp;Microsoft&ensp;.NET&ensp;Framework&ensp;version&ensp;3.5.&ensp;Y...

3、You create a Microsoft

You&ensp;create&ensp;a&ensp;Microsoft&ensp;ASP.NET&ensp;application&ensp;by&ensp;using&ensp;the&ensp;Microsoft&ensp;.NET&ensp;Framework&ensp;version&ensp;3.5.&ensp;Y...

4、You create a Microsoft

You&ensp;create&ensp;a&ensp;Microsoft&ensp;ASP.NET&ensp;application&ensp;by&ensp;using&ensp;the&ensp;Microsoft&ensp;.NET&ensp;Framework&ensp;version&ensp;3.5.&ensp;Y...

5、You create a Microsoft

You&ensp;create&ensp;a&ensp;Microsoft&ensp;ASP.NET&ensp;application&ensp;by&ensp;using&ensp;the&ensp;Microsoft&ensp;.NET&ensp;Framework&ensp;version&ensp;3.5.&ensp;&...

6、You create a Microsoft

You&ensp;create&ensp;a&ensp;Microsoft&ensp;ASP.NET&ensp;application&ensp;by&ensp;using&ensp;the&ensp;Microsoft&ensp;.NET&ensp;Framework&ensp;version&ensp;3.5.&ensp;Y...