单项选择题
Certkiller.com has hired you as a Web Application Developer for their network. The previousadministrator created a Microsoft ASP.NET application using Microsoft .NET Framework v3.5.
You check and discover that the application contains a DataSourceControl named CatDS1. ThisDataSourceControl is bound to a Microsoft SQL Server 2005 table. The primary key of the table isthe CatName column. The code below is written in the FormView control. (The line numbers isincluded for reference purposes)
01
02
03
05 DataSourceID="CatDS1"
06 DataTextField="CatName"
07 DataValueField="CatID"
08 Runat="server" />
09
10
You have to make sure that any modifications made to the CatID field is written to the database.You should therefore identify the code segment that has to be added in line 04.
What should you identify?()
A.Your best option would be to add the SelectedValue='<%# Bind("CatName") %>' codesegment.
B.Your best option would be to add the SelectedValue='<%# Bind("CatID") %>' code segment.
C.Your best option would be to add the SelectedValue='<%# Eval("CatID") %>' code segment.
D.Your best option would be to add the SelectedValue='<%# Eval("CatName") %>' codesegment.
相关考题
-
单项选择题
You are the newly appointed Web Application Developer at Certkiller.com. You make use ofMicrosoft .NET Framework v3.5 to create a Microsoft ASP.NET application. You create a page on the application that contains the code segment below:<asp:ListBox ID="lstBox1"AutoPostBack="true" runat="server" /> The page contains a code-behind file. The code below is written in the file:Private Sub BindData(ByVal sender As Object, ByVal e As EventArgs) lstLanguages.DataSource = CultureInfo.GetCultures(CultureTypes.AllCultures)lstLanguages.DataTextField = "EnglishName"lstLanguages.DataBind()End Sub You receive an instruction from management to make sure that lstBox1 ListBox control retains theselection of the Certkiller client during postback. You thus need to determine the appropriate codethat should be added in the constructor of the page. What should you do?()
A.You should consider adding AddHandler lstLanguages.SelectedIndexChanged, AddressOfBindData to the constructor of the page.
B.You should consider adding AddHandler Me.Init, AddressOf BindData to the constructor of thepage.
C.You should consider adding AddHandler Me.PreRender, AddressOf BindData to theconstructor of the page.
D.You should consider adding AddHandler lstLanguages.PreRender, AddressOf BindData to theconstructor of the page. -
单项选择题
You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5. The application contains a page named Exams.aspx. Exams.aspx calls the following SQL query inorder to display names of exams in a GridView control: SELECT ExamID, Name, Code FROM Exams Another page named ExamInfo.aspx makes use of the Exam query string parameter in order todisplay information about an exam. The exam is identified by the ExamID field that is returnedfrom the SQL query, the name of the book is represented by the Name field returned from thequery, and the exam code is represented by the Code field. You add a HyperLink control to atemplate field of the GridView control. You decide to declare the HyperLink control in order for it to display exams names. It should alsolink the user to ExamInfo.aspx in order to view the selected book. How should you implement thisHyperlink?()
A.A
B.B
C.C
D.D -
单项选择题
Certkiller.com has employed you as a system administrator. You make sue of .NET Frameworkv3.5 to create an ASP.NET application. The application contains a Web form file. This file isnamed MovieReviews.aspx. The file is linked to a LinqDataSource DataSource named LinqDataSource1. LinqDataSource1contains a primary key named TestMovieID. The application also contains a DetailsView controlthat is named CKDetailsView. The code below is included in the MovieReviews.aspx file. (The linenumbers is included for reference purposes) 01 <asp:DetailsView ID="DView1" runat="server"DataSourceID="LinqDS1"0304 /> 05 <Fields> 06 <asp:BoundField DataField="TestID" HeaderText="No" InsertVisible="False" 08 ReadOnly="True" SortExpression="TestID" /> 09 <asp:BoundField DataField="Name" HeaderText="Name" 10 SortExpression="Name" /> 11 <asp:BoundField DataField="Cat" HeaderText="Category" SortExpression="Cat" /> 13 <asp:CommandField ShowDeleteButton="false" ShowEditButton="True" 14. ShowInsertButton="True" /> 15 </Fields> 16 </asp:DetailsView> All Certkiller clients makes use of DView1. To ensure productivity you need to make sure that theyare able to insert and update content in the control. It is vital that you ensure the prevention ofduplivcation of the link button controls for the Edit and New operations. You thus need todetermine the appropriate code fragment you need to insert at line 3. What should you do?()
A.A
B.B
C.C
D.D
