护理学章节练习

单选题You create a Web Form that displays a GridView. The GridViews data source is a DataSet named dsOrders. The DataSet contains two DataTables named Orders and OrderDetails. You create a relation between the two DataTables using the following code segment.

题目
单选题
You create a Web Form that displays a GridView. The GridViews data source is a DataSet named dsOrders. The DataSet contains two DataTables named Orders and OrderDetails. You create a relation between the two DataTables using the following code segment. (Line numbers are included for reference only.)01 dtOrders = dsOrders.Tables[“Orders”]; 02 dtOrderDetails = dsOrders.Tables[“OrderDetail”]; 03 colParent = dtOrders.Columns[“OrderID”]; 04 colChild = dtOrderDetails.Columns[“ParentOrderID”]; 05 dsOrders.Relations.Add(“Rell”, colParent, colChild, false); You need to find the cause of the exception being raised in line 05. What should you do? ()
A

Ensure that the child column and the parent column have the same names.

B

Ensure that the child table and the parent table have the same names.

C

Ensure that the child column and the parent column have the same data types.

D

Ensure that each row in the child table has a corresponding row in the parent table.

E

Ensure that the tables have an explicit relationship defined by a foreign key constraint in the database.

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visual Studio .NET 2010 as its application development platform.  You are creating an ASP.NET Web application using .NET Framework 4.0. The Web application comprises a class named Employee with properties named as First Name, Last Name, and Age. You add a Web page in which you get a list of Employee objects and display those objects in a GridView control. You are required to add code so that the GridView row is highlighted in red color if the age of the employee is less than 21 years.  What will you do to accomplish this?()

  • A、Use the RowCommand event of the GridView control.
  • B、Use the SelectedlndexChanged event of the GridView control.
  • C、Use the RowDataBound event of the GridView control.
  • D、Use the RowEditing event of the GridView control.
  • E、Use the RowUpdated event of the GridView control.

正确答案:C

第2题:

You create a Web Form that displays a GridView. The GridViews data source is a DataSet named dsOrders. The DataSet contains two DataTables named Orders and OrderDetails. You create a relation between the two DataTables using the following code segment. (Line numbers are included for reference only.)01 dtOrders = dsOrders.Tables[“Orders”]; 02 dtOrderDetails = dsOrders.Tables[“OrderDetail”]; 03 colParent = dtOrders.Columns[“OrderID”]; 04 colChild = dtOrderDetails.Columns[“ParentOrderID”]; 05 dsOrders.Relations.Add(“Rell”, colParent, colChild, false); You need to find the cause of the exception being raised in line 05. What should you do? ()

  • A、Ensure that the child column and the parent column have the same names.
  • B、Ensure that the child table and the parent table have the same names.
  • C、Ensure that the child column and the parent column have the same data types.
  • D、Ensure that each row in the child table has a corresponding row in the parent table.
  • E、Ensure that the tables have an explicit relationship defined by a foreign key constraint in the database.

正确答案:C

第3题:

You are creating a mobile Web Form that dynamically displays news items. You want to display news items by using an instance of a mobile TextView control named TextViewNews. You need to configure the Web Form that contains TextViewNews. The Web Form must enable pagination in casea users device does not display the full text of a news item.Which code segment should you use? ()

A.

B.

C.

D.


参考答案:D

第4题:

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You create a Web page that has a GridView control named GridView1. The GridView1 control displays the  data from a database named Region and a table named Location.  You write the following code segment to populate the GridView1 control. (Line numbers are included for reference only.)  01 Protected Sub Page_Load(ByVal sender As Object, _ ByVal e As EventArgs)  02 Dim connstr As String  03 ...  04 SqlDependency.Start(connstr)  05 Using connection As New SqlConnection(connstr)  06 Dim sqlcmd As New SqlCommand()  07 Dim expires As DateTime = DateTime.Now.AddMinutes(30)  08 Dim dependency As SqlCacheDependency = _  09 New SqlCacheDependency("Region", "Location")  10 Response.Cache.SetExpires(expires)  11 Response.Cache.SetValidUntilExpires(True)  12 Response.AddCacheDependency(dependency)  13  14 sqlcmd.Connection = connection  15 GridView1.DataSource = sqlcmd.ExecuteReader()  16 GridView1.DataBind()  17 End Using 18 End Sub  You need to ensure that the proxy servers can cache the content of the GridView1 control. Which code segment should you insert at line 13? () | English | Chinese | Japan | Korean | - 90 - Test Information Co., Ltd. All rights reserved.

  • A、Response.Cache.SetCacheability(HttpCacheability.Private) 
  • B、Response.Cache.SetCacheability(HttpCacheability.Public) 
  • C、Response.Cache.SetCacheability(HttpCacheability.Server) 
  • D、Response.Cache.SetCacheability(HttpCacheability.ServerAndPrivate) 

正确答案:B

第5题:

You create a Web Form. The Web Form allows users to recover their passwords. You add a PasswordRecovery server control by using the following code segment.You need to ensure that the server control generates a new password and sends it by e-mail to the users e?mail address. Which two actions should you perform?()

  • A、Create a valid definition in the Web.config file.
  • B、Set the passwordFormat attribute of the configured membership provider to Encrypted.
  • C、Ensure that the enablePasswordRetrieval attribute of the configured membership provider is set to False.
  • D、Ensure that the enablePasswordRetrieval attribute of the configured membership provider is set to True.

正确答案:A,C

第6题:

You create a Web Form that contains connected Web Parts. You write the following declaration in your Web Form. You need to ensure that your Web Part connection is valid. Which two actions should you perform? ()

  • A、Include a data source identified as "WebPartConnection1" on the Web Form.
  • B、Include a Web Part identified as "customerPart" on the Web Form.
  • C、Include a Web Part identified as "ordersPart" on the Web Form.
  • D、Ensure that you declare an interface named "IOrdersPart".
  • E、Ensure that you declare an interface named "ICustomerPart".
  • F、Ensure that each Web Part declares either a GetInterface or ProvideInterface method.

正确答案:B,C

第7题:

You create a Web Form. You need to add controls that use adaptive rendering to display content. The type of content rendered must depend on the device that is requesting the page. What are two possible ways to achieve this goal? ()

  • A、Add custom controls that emit XHTML to the Web Form.
  • B、Add custom controls that emit WML to the Web Form.
  • C、Add mobile controls to the Web Form.
  • D、Add Web server controls to the Web Form.

正确答案:C,D

第8题:

You create a Web Form that contains connected Web Parts. You write the following declaration in your Web Form.You need to ensure that your Web Part connection is valid. Which two actions should you perform? ()

A. Include a data source identified as "WebPartConnection1" on the Web Form.

B. Include a Web Part identified as "customerPart" on the Web Form.

C. Include a Web Part identified as "ordersPart" on the Web Form.

D. Ensure that you declare an interface named "IOrdersPart".

E. Ensure that you declare an interface named "ICustomerPart".

F. Ensure that each Web Part declares either a GetInterface or ProvideInterface method.


参考答案:B, C

第9题:

You create a master page named Template.master. Template.master contains the following ContentPlaceHolder server controls.You also create 10 Web Forms. The Web Forms reference Template.master as their master page. Each Web Form has the following Content controls that correspond to the ContentPlaceHolder controls in Template.master.You need to configure the Web pages so that default content will be shown in the area2 ContentPlaceHolder control whenever a Web Form does not provide that content. What should you do? ()

  • A、Move default content inside area2 in Template.master. Remove area2 from Web Forms that do not provide content.
  • B、Move default content inside area2 in Template.master. Leave area2 blank in Web Forms that do not provide content.
  • C、Move default content inside area2 in the Web Forms. Remove area2 from Template.master.
  • D、Create an additional ContentPlaceHolder control in Template.master named area2_default. Place default content inside area2_default. Remove area2 from Web Forms that do not provide content.

正确答案:A

第10题:

You are implementing an ASP.NET Web application. Users will authenticate to the application with an ID. The application will allow new users to register for an account. The application will generate an ID for the user based on the users full name. You need to implement this registration functionality. Which two actions should you perform?()

  • A、Configure the SqlMembershipProvider in the web.config file.
  • B、Configure the SqlProfileProvider in the web.config file.
  • C、Create an ASP.NET page that contains a default CreateUserWizard control to create a new user account.
  • D、Create an ASP.NET page that contains a custom form that collects the user information and then uses the Membership.CreateUser method to create a new user account.

正确答案:A,D

更多相关问题