相关考题

单项选择题 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"/>  | English | Chinese | Japan | Korean | - 124 - Test Information Co., Ltd. All rights reserved. <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?()

单项选择题 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? ()

单项选择题 You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  The application contains a DataSourceControl named CategoriesDataSource that is bound to a Microsoft SQL Server 2005 table. The CategoryName column is the primary key of the table.  You write the following code fragment in a FormView control. (Line numbers are included for reference only.)  01 <tr>  02 <td align="right"><b>Category:</b></td>  03 <td><asp:DropDownList ID="InsertCategoryDropDownList"  04  05 DataSourceID="CategoriesDataSource"  06 DataTextField="CategoryName"  07 DataValueField="CategoryID"  08 RunAt="Server" />  09 </td>  10 </tr>  You need to ensure that the changes made to the CategoryID field can be written to the database.  Which code fragment should you insert at line 04?()