单选题You are implementing an ASP.NET page. The page includes a method named GetCustomerOrderDataSet that returns a DataSet. The DataSet includes a DataTable named CustomerDetailsTable and a DataTable named OrderDetailsTable. You need to display the data in OrderDetailsTable in a DetailsView control named dtlView. Which code segment should you use?()A dtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataMember = OrderDetailsTable; dtlView.DataBind();BdtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataSourceID = OrderDetailsTable; dtlView.DataBind();CdtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataKeyNames = new string [] { OrderDetailsTable}; dtlView.DataBind();DDataSet dataSet = GetCustomerOrderDataSet(); dtlView.DataSource = new DataTable(dataSet, OrderDetailsTable); dtlView.DataBind();

单选题
You are implementing an ASP.NET page. The page includes a method named GetCustomerOrderDataSet that returns a DataSet. The DataSet includes a DataTable named CustomerDetailsTable and a DataTable named OrderDetailsTable. You need to display the data in OrderDetailsTable in a DetailsView control named dtlView. Which code segment should you use?()
A

 dtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataMember = OrderDetailsTable; dtlView.DataBind();

B

dtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataSourceID = OrderDetailsTable; dtlView.DataBind();

C

dtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataKeyNames = new string [] { OrderDetailsTable}; dtlView.DataBind();

D

DataSet dataSet = GetCustomerOrderDataSet(); dtlView.DataSource = new DataTable(dataSet, OrderDetailsTable); dtlView.DataBind();


参考解析

解析: 暂无解析

相关考题:

Certkiller.com has employed you as a Web Application Developer. You are in the process ofcreating an ASP.NET application using Microsoft .NET Framework v3.5. You decide to create acustom Web user control for the application.  You name this control TestShare. TestShare will be compiled as a library. The code below iswritten for TestShare. (The line numbers is included for reference purposes) 1 Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs) 2 MyBase.OnInit(e) 3 4 End Sub  The master pages in the application contains the directive below:%@ Master Language="VB" EnableViewState="false" % You receive an instruction from management to make sure that the state of TestShare is able tocontinue on the pages that reference a master page. You thus need to determine the appropriatecode that should be added at line 3.  What should you identify?()A、You should consider adding the Page.RegisterRequiresControlState(Me) code fragment.B、You should consider adding the Page.UnregisterRequiresControlState(Me) code fragment.C、You should consider adding the Page.RegisterStartupScript("TestShare", "server") codefragment.D、You should consider adding the Page.RegisterRequiresPostBack(Me) code fragment.

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” _ %

You develop an ASP.NET Web page that includes multiple WebPartZone controls, an EditorZone. Users report that they cannot customize the layout of the page by moving WebParts from one.You need to ensure that users can successfully move Web Parts from one zone to another. What should you do?()A、Configure the Web site to enable session state.B、Configure the Web site to require authentication and to use personalization.C、Add a ProxyWebPartManager control to the page.D、Add a AppearanceEditorPart control to the page.

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.

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、ContentB、ContentPlaceHolderC、PlaceHolderD、Substitution

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" %

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 attributeB、the ResponseEncoding attributeC、the ValidateRequest attributeD、the Strict attribute

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、DataSourceB、DataSourceIDC、DataKeyNamesD、DataMember

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application must redirect the original URL to a different ASPX page.  You need to ensure that the users cannot view the original URL after the page is executed. You also need to ensure that each page execution requires only one request from the client browser. What should you do?()A、Use the Server.Transfer method to transfer execution to the correct ASPX page.B、Use the Response.Redirect method to transfer execution to the correct ASPX page.C、Use the HttpContext.Current.RewritePath method to transfer execution to the correct ASPX page.D、Add the Location: new URL value to the Response.Headers collection. Call the Response.End() statement. Send the header to the client computer to transfer execution to the correct ASPX page.

You are implementing an ASP.NET page. The page includes a method named GetCustomerOrderDataSet that returns a DataSet. The DataSet includes a DataTable named CustomerDetailsTable and a DataTable named OrderDetailsTable. You need to display the data in OrderDetailsTable in a DetailsView control named dtlView. Which code segment should you use?()A、 dtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataMember = "OrderDetailsTable"; dtlView.DataBind();B、dtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataSourceID = "OrderDetailsTable"; dtlView.DataBind();C、dtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataKeyNames = new string [] { "OrderDetailsTable"}; dtlView.DataBind();D、DataSet dataSet = GetCustomerOrderDataSet(); dtlView.DataSource = new DataTable("dataSet", "OrderDetailsTable"); dtlView.DataBind();

You are developing an ASP.NET Web page. You add a data-bound GridView control. The GridView contains a TemplateField that includes a DropDownList. You set the GridViews ClientIDMode property to Static, and you set the ClientIDRowSuffix property to ProductID. You need to be able to reference individual DropDownList controls from client-side script by using the ProductID. What should you set the ClientIDMode property of the DropDownList to? ()A、AutoIDB、StaticC、InheritD、Predictable

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 theASP.NET page designer. You need to add a control to the master page to define the region. Which control should you add?()A、PlaceHolderB、ContentPlaceHolderC、ContentD、Substituition

You work as an ASP.NET Web Application Developer for SomeCompany.  The company uses Visual Studio .NET 2010 as its application development platform. You create an ASP.NET Web application using .NET Framework 4.0. You create a Web page in the application. The Web page will get large sets of data from a data source.  You add a DataPager control to the page. You are required to display navigation controls that enable you to create a custom paging Ul for the DataPager control. What will you do?()A、Use NextPreviousPagerField.B、Use NumericPagerField.C、Use PreviousPagerField.D、Use NextPagerField.E、Use TemplatePagerField.

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You create a custom Web user control named SharedControl. The control will be compiled as a library.  You write the following code segment for the SharedControl control. (Line numbers are included for reference only.)  01 Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs)  02 MyBase.OnInit(e)  03  04 End Sub  All the master pages in the ASP.NET application contain the following directive.  %@ Master Language="VB" EnableViewState="false" %  You need to ensure that the state of the SharedControl control can persist on the pages that reference a master page.  Which code segment should you insert at line 03?()A、Page.RegisterRequiresPostBack(Me)B、Page.RegisterRequiresControlState(Me)C、Page.UnregisterRequiresControlState(Me)D、Page.RegisterStartupScript("SharedControl", "server")

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.

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You create a custom-templated server control.  You need to ensure that the child controls of the server control are uniquely identified within the control hierarchy of the page.  Which interface should you implement?()A、the ITemplatable interfaceB、the INamingContainer interfaceC、the IRequiresSessionState interfaceD、the IPostBackDataHandler interface

You work as a system administrator at Certkiller.com. You are in the process of creating anASP.NET application using Microsoft .NET Framework v3.5.  You receive an instruction from management to create a custom-templated server control. Toensure productivity you need to make sure that the child controls of the newly created servercontrol are identified within the hierarchy of the page. You thus need to identify the interface thatwill accomplish this.  What should you do?()A、You should consider implementing the IRequiresSessionState interface.B、You should consider implementing the ITemplatable interface.C、You should consider implementing the IPostBackDataHandler interface.D、You should consider implementing the INamingContainer interface

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a custom Web user control named SharedControl. The control will be compiled as a library.  You write the following code segment for the SharedControl control: 01 protected override void OnInit(EventArgs e)   02 {   03   base.OnInit(e);   04 ►  05 }    All the master pages in the ASP.NET application contain the following directive. %@ Master Language="C#" EnableViewState="false" %    You need to ensure that the state of the SharedControl control can persist on the pages that reference a master page.  Which code segment should you insert at line 04?()A、Page.RegisterRequiresPostBack(this); B、Page.RegisterRequiresControlState(this); C、Page.UnregisterRequiresControlState(this); D、Page.RegisterStartupScript("SharedControl","server");

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:  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 are creating an ASP.NET Web site. The site has a master page named Custom.master. The code-behind file for Custom.master contains the following code segment.Partial Public Class Custom  Inherits System.Web.UI.MasterPagePublic Property Region As String    Protected Sub Page_Load(ByVal sender As Object,ByVal e As System.EventArgs) Handles Me.LoadEnd SubEnd Class You create a new ASP.NET page and specify Custom.master as its master page.You add a Label control named lblRegion to the new page.  You need to display the value of the master pages Region property in lblRegion.What should you do? ()AAdd the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Parent  lblRegion.Text = custom.RegionBAdd the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Master  lblRegion.Text = custom.RegionCAdd the following code segment to the Page_Load method of the Custom.Master.vb code-behind file. Dim lblRegion As Label = Page.FindControl(lblRegion) lblRegion.Text = Me.RegionDAdd the following code segment to the Page_Load method of the Custom.Master.vb code-behind file. Dim lblRegion As Label = Master.FindControl(lblRegion) lblRegion.Text = Me.Region

单选题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” _ %

单选题You are implementing an ASP.NET application. The application includes a Person class with property Age. You add a page in which you get a list of Person objects and display the objects in a GridView control. You need to add code so that the GridView row is highlighted in red if the age of the person is less than 18. Which GridView event should you handle?()ARowDataBoundBRowCommandCRowUpdatedDRowEditing

单选题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 %

单选题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:  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?()AYou should consider adding AddHandler lstLanguages.SelectedIndexChanged, AddressOfBindData to the constructor of the page.BYou should consider adding AddHandler Me.Init, AddressOf BindData to the constructor of thepage.CYou should consider adding AddHandler Me.PreRender, AddressOf BindData to theconstructor of the page.DYou should consider adding AddHandler lstLanguages.PreRender, AddressOf BindData to theconstructor of the page.

单选题You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You create a custom Web user control named SharedControl. The control will be compiled as a library.  You write the following code segment for the SharedControl control. (Line numbers are included for reference only.)  01 Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs)  02 MyBase.OnInit(e)  03  04 End Sub  All the master pages in the ASP.NET application contain the following directive.    You need to ensure that the state of the SharedControl control can persist on the pages that reference a master page.  Which code segment should you insert at line 03?()APage.RegisterRequiresPostBack(Me)BPage.RegisterRequiresControlState(Me)CPage.UnregisterRequiresControlState(Me)DPage.RegisterStartupScript(SharedControl, server)

单选题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?()Athe EnableEventValidation attributeBthe ResponseEncoding attributeCthe ValidateRequest attributeDthe Strict attribute

单选题Certkiller.com has employed you as a Web Application Developer. You are in the process ofcreating an ASP.NET application using Microsoft .NET Framework v3.5. You decide to create acustom Web user control for the application.  You name this control TestShare. TestShare will be compiled as a library. The code below iswritten for TestShare. (The line numbers is included for reference purposes) 1 Protected Overloads Overrides Sub OnInit(ByVal e As EventArgs) 2 MyBase.OnInit(e) 3 4 End Sub  The master pages in the application contains the directive below: You receive an instruction from management to make sure that the state of TestShare is able tocontinue on the pages that reference a master page. You thus need to determine the appropriatecode that should be added at line 3.  What should you identify?()AYou should consider adding the Page.RegisterRequiresControlState(Me) code fragment.BYou should consider adding the Page.UnregisterRequiresControlState(Me) code fragment.CYou should consider adding the Page.RegisterStartupScript(TestShare, server) codefragment.DYou should consider adding the Page.RegisterRequiresPostBack(Me) code fragment.

单选题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?()ASet the DataPager control’s PageSize property to the number of rows to view at one time.BSet the DataPager control’s PagedControlID property to the ID of the ListView control.CIn the code-behind file, set the DataPager control’s Parent property to the ListView control.DIn the code-behind file, set the ListView control’s Parent property to the DataPager control.