You are implementing an ASP.NET page that will retrieve larg

题目
单选题
You are implementing an ASP.NET page that will retrieve large sets of data from a data source. You add a ListView control and a DataPager control to the page. You need to ensure that the data can be viewed one page at a time. What should you do?()
A

Set the DataPager control’s PageSize property to the number of rows to view at one time.

B

Set the DataPager control’s PagedControlID property to the ID of the ListView control.

C

In the code-behind file, set the DataPager control’s Parent property to the ListView control.

D

In the code-behind file, set the ListView control’s Parent property to the DataPager control.

参考答案和解析
正确答案: D
解析: 暂无解析
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5.  You create a folder named Dark in the App_Themes folder of the Web application. You also addfour skin files to this folder. You have to make sure that the controls on a page have their appearances overridden by the control definitions defined in the skin files. What should you do?  Which Page directive should you use?()

  • A、You should use the page directive: <%@ Page StyleSheetTheme="App_Themes.Dark"/>
  • B、You should use the page directive: <%@ Page Theme="App_Themes.Dark"/>
  • C、You should use the page directive: <%@ Page Theme="Dark"/>
  • D、You should use the page directive: <%@ Page StyleSheetTheme="Dark"/>

正确答案:C

第2题:

You are implementing an ASP.NET application that includes a page named TestPage.aspx. TestPage.aspx uses a master page named TestMaster.master.You add the following code to the TestPage.aspx code-behind file to read a TestMaster.master public property named CityName. Protected Sub Page_Load(ByVal sender As Object,ByVal e As System.EventArgs) Handles Me.LoadDim s As String = Master.CityNameEnd Sub  You need to ensure that TestPage.aspx can access the CityName property. What should you do?()

  • A、Add the following directive to TestPage.aspx. <%@ MasterType VirtualPath="~/TestMaster.master" %> 
  • B、Add the following directive to TestPage.aspx. <%@ PreviousPageType VirtualPath="~/TestMaster.master" %> 
  • C、Set the Strict attribute in the @ Master directive of the TestMaster.master page to true. 
  • D、Set the Explicit attribute in the @ Master directive of the TestMaster.master page to true. 

正确答案:A

第3题:

An ASP.NET application hosts a RESTful Windows Communication Foundation (WCF) service at /Services/Contoso.svc.The service provides a JavaScript resource to clients. You have an explicit reference to the JavaScript in your page markup as follows.You need to retrieve the debug version of the service JavaScript. What should you do?()

A. In the <%@ ServiceHost %> header for /Services/Contoso.svc, set the Debug attribute to true.

B. In the <%@ Page %> header, set the Debug attribute to true.

C. In the script tag, add a debug attribute and set its value to true.

D. In the script tag, append debug to the src attribute.


参考答案:D

第4题:

You are testing an existing ASP.NET page. The page includes a text box. You are able to execute malicious JavaScript code by typing it in the text box and submitting. You need to configure the page to prevent JavaScript code from being submitted by the text box. In the @ Page directive, which attribute should you set to true?()

  • A、the EnableEventValidation attribute
  • B、the ResponseEncoding attribute
  • C、the ValidateRequest attribute
  • D、the Strict attribute

正确答案:C

第5题:

You are developing an ASP.NET Web application. You create a master page. The master page requires a region where you can add page-specific content by using the ASP.NET page designer.  You need to add a control to the master page to define the region. Which control should you add?()

  • A、Content
  • B、ContentPlaceHolder
  • C、PlaceHolder
  • D、Substitution

正确答案:B

第6题:

You are implementing an ASP.NET Web page. The page includes several controls, but only a GridView requires view state. You set the GridView… You need to ensure that the page will omit unneeded view state. Wich @ Page directive should you use?()

  • A、<% Page EnableViewState=”true” ViewStateMode=”Enabled” _ %>
  • B、<% Page EnableViewState=”true” ViewStateMode=”Disabled” _ %>
  • C、<% Page EnableViewState=”false” ViewStateMode=”Disabled” _ %>
  • D、<% Page EnableViewState=”false” ViewStateMode=”Enabled” _ %>

正确答案:B

第7题:

You are implementing a Web page that displays text that was typed by a user. You need to display the user input in the Web page so that a cross-site scripting attack will be prevented. What should you do?()

  • A、Call document.write.
  • B、Call Response.Write.
  • C、Call HttpUtility.UrlEncode.
  • D、Call HttpUtility.HtmlEncode.

正确答案:D

第8题:

You create an ASP.NET page named TestPage.aspx that contains validation controls. You need to verify that all input values submitted by the user have been validated by testing the Page.IsValid property. Which page event should you add an event handler to?()

  • A、Init
  • B、Load
  • C、PreInit
  • D、PreLoad

正确答案:B

第9题:

You are perfoming security testing on an existing asp.net web page.You notice that you are able to issue unauthorised postback requests to the page. You need to prevent unauthorised post back requests. which page directive you use?()

  • A、<%@Page strict = "true" %>  
  • B、<%@Page enableViewStateMac = "true" %>
  • C、<%@Page EnableEventValidation = "true" %>
  • D、<%@Page Aspcompact = "true" %>

正确答案:C

第10题:

You are developing an ASP.NET Web page. The page includes a List instance. You add a FormView control to display a single Product from this list. You need to bind the list to the FormView control. Which FormView property should you set in the code-behind file?()

  • A、DataSource
  • B、DataSourceID
  • C、DataKeyNames
  • D、DataMember

正确答案:A

更多相关问题