You create a master page named Article.master. Article.master serves as the template for articles on your Web site. The master page uses the following page directives. <%@ Master Language="C#" Src="~/article.master.cs" Inherits="article" %> You need to cr

题目

You create a master page named Article.master. Article.master serves as the template for articles on your Web site. The master page uses the following page directives. <%@ Master Language="C#" Src="~/article.master.cs" Inherits="article" %> You need to create a content page that uses the master page as a template. In addition, you need to use a single master page for all devices that access the Web site. Which code segment should you use? ()

  • A、<%@ Page Language="C#" Theme="article"%>
  • B、<%@ Page Language="C#" MasterPageFile="~/article.master"%>
  • C、<%@ Page Language="C#" ie:MasterPageFile="~/article.master"%>
  • D、<%@Page Language="C#" all:MasterPageFile="~/article.master"%>

相似考题
更多“You create a master page named A”相关问题
  • 第1题:

    You have a master page custom.master ... u create a nested.master page using it ... and then u have content page that uses the nested.master as its master page ...  to get a string prop from custom.master into a label in content page the code u wud use()

    • A、master.master
    • B、parent.master
    • C、this.master
    • D、unknown

    正确答案:B

  • 第2题:

    You develop a Web application that contains two master pages. You need to dynamically set the master page when a user views pages in the application. What should you do? ()

    • A、Set Page.MasterPageFile in the Page's Page_Init event.
    • B、Set Page.MasterPageFile in the Page's OnInit event.
    • C、Set Page.MasterPageFile in the Page's Page_Load event.
    • D、Set Page.MasterPageFile in the Page's Page_PreInit event.

    正确答案:D

  • 第3题:

    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 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  | English | Chinese | Japan | Korean | - 87 - Test Information Co., Ltd. All rights reserved. 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");

    正确答案:B

  • 第4题:

    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

  • 第5题:

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

    正确答案:B

  • 第6题:

    You work as a Web Application Developer at Certkiller.com. You make use of .NET Frameworkv3.5 to create an ASP.NET application.  You decide to create a Web user control named KingShare. KingShare is compiled as a library.The code segment below is written for KingShare. (The line numbers is included for reference purposes) 1 protected override void OnInit(EventArgs e) 2 { 3 base.OnInit(e); 4 5 }  The master pages in the application contains the <%@ Master Language="C#" EnableViewState="false" %> directive. You receive an instruction from the network administratorto make sure that the KingShare state is able to persist on the pages that reference the masterpage. You should thus identify the appropriate code segment you need to add to line 4 to achievethis.  What should you do?()

    • A、Your best option would be to insert Page.RegisterRequiresPostBack(this)
    • B、Your best option would be to insert Page.RegisterRequiresControlState(this)
    • C、Your best option would be to insert Page.UnregisterRequiresControlState(this)
    • D、Your best option would be to insert Page.RegisterStartupScript("KingShare","server")

    正确答案:B

  • 第7题:

    单选题
    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 add an event handler to?()
    A

    Ini

    B

    Load

    C

    PreInit

    D

    PreLoad


    正确答案: B
    解析: 暂无解析

  • 第8题:

    单选题
    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 void Page_Load(object sender, EventArgs e) { string s = Master.CityName; }  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 %><%@ mastertype="" virtualpath="~/TestMaster.master">

    B

    Add the following directive to TestPage.aspx. <%@ PreviousPageType VirtualPath=~/TestMaster.master %><%@ 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
    解析: 暂无解析

  • 第9题:

    单选题
    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.     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);


    正确答案: A
    解析: 暂无解析

  • 第10题:

    单选题
    You work as a Web Application Developer at Certkiller.com. You make use of .NET Frameworkv3.5 to create an ASP.NET application.  You decide to create a Web user control named KingShare. KingShare is compiled as a library.The code segment below is written for KingShare. (The line numbers is included for reference purposes) 1 protected override void OnInit(EventArgs e) 2 { 3 base.OnInit(e); 4 5 }  The master pages in the application contains the  directive. You receive an instruction from the network administratorto make sure that the KingShare state is able to persist on the pages that reference the masterpage. You should thus identify the appropriate code segment you need to add to line 4 to achievethis.  What should you do?()
    A

    Your best option would be to insert Page.RegisterRequiresPostBack(this)

    B

    Your best option would be to insert Page.RegisterRequiresControlState(this)

    C

    Your best option would be to insert Page.UnregisterRequiresControlState(this)

    D

    Your best option would be to insert Page.RegisterStartupScript(KingShare,server)


    正确答案: C
    解析: 暂无解析

  • 第11题:

    单选题
    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
    解析: 暂无解析

  • 第12题:

    单选题
    You develop a Web application that contains two master pages. You need to dynamically set the master page when a user views pages in the application. What should you do?()
    A

    SetPage.MasterPageFile in the Page’sPage_Initevent.

    B

    SetPage.MasterPageFile in the Page’sOnInit event.

    C

    SetPage.MasterPageFile in the Page’sPage_Loadevent.

    D

    SetPage.MasterPageFile in the Page’sPage_PreInitevent.


    正确答案: D
    解析: 暂无解析

  • 第13题:

    You create a Web page named TestPage.aspx and a user control named contained in a file named TestUserControl.ascx.You need to dynamically add TestUserControl.ascx to TestPage.aspx. Which code segment should you use?()

    • A、protected void Page_Load(object sender, EventArgs e) { Control userControl=Page.LoadControl("TestUserControl.ascx"); Page.Form.Controls.Add(userControl); }
    • B、protected void Page_Load(object sender, EventArgs e) { Control userControl = Page.FindControl("TestUserControl.ascx"); Page.Form.Controls.Load(userControl); }
    • C、protected void Page_PreInit(object sender, EventArgs e) { Control userControl =Page.LoadControl("TestUserControl.ascx");Page.Form.Controls.Add(userControl); }
    • D、protected void Page_PreInit(object sender, EventArgs e) { Control userControl = Page.FindControl("TestUserControl.ascx"); Page.Form.Controls.Load(userControl); }

    正确答案:C

  • 第14题:

    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

  • 第15题:

    You create a master page named Article.master. Article.master serves as the template for articles on your Web site. The master page uses the following page directives. <%@ Master Language="VB" CodeFile="article.master.vb" Inherits="article" %> You need to create a content page that uses the master page as a template. In addition, you need to use a single master page for all devices that access the Web site. Which code segment should you use? ()

    • A、<%@ Page Language="VB" Theme="article"%>
    • B、<%@ Page Language="VB" MasterPageFile="~/article.master"%>
    • C、<%@ Page Language="VB" ie:MasterPageFile="~/article.master"%>
    • D、<%@Page Language="VB" all:MasterPageFile="~/article.master"%>

    正确答案:B

  • 第16题:

    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、PlaceHolder
    • B、ContentPlaceHolder
    • C、Content
    • D、Substituition

    正确答案:B

  • 第17题:

    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");

    正确答案:B

  • 第18题:

    You develop a Web application that contains two master pages. You need to dynamically set the master page when a user views pages in the application. What should you do?()

    • A、SetPage.MasterPageFile in the Page’sPage_Initevent.
    • B、SetPage.MasterPageFile in the Page’sOnInit event.
    • C、SetPage.MasterPageFile in the Page’sPage_Loadevent.
    • D、SetPage.MasterPageFile in the Page’sPage_PreInitevent.

    正确答案:D

  • 第19题:

    单选题
    You have a master page custom.master ... u create a nested.master page using it ... and then u have content page that uses the nested.master as its master page ...  to get a string prop from custom.master into a label in content page the code u wud use()
    A

    master.master

    B

    parent.master

    C

    this.master

    D

    unknown


    正确答案: B
    解析: 暂无解析

  • 第20题:

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

    Add the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Parent  lblRegion.Text = custom.Region

    B

    Add the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Master  lblRegion.Text = custom.Region

    C

    Add 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.Region

    D

    Add 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


    正确答案: C
    解析: 暂无解析

  • 第21题:

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

    Page.RegisterRequiresPostBack(Me)

    B

    Page.RegisterRequiresControlState(Me)

    C

    Page.UnregisterRequiresControlState(Me)

    D

    Page.RegisterStartupScript(SharedControl, server)


    正确答案: D
    解析: 暂无解析

  • 第22题:

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


    正确答案: D
    解析: 暂无解析

  • 第23题:

    单选题
    You create a master page named Article.master. Article.master serves as the template for articles on your Web site. The master page uses the following page directives. You need to create a content page that uses the master page as a template. In addition, you need to use a single master page for all devices that access the Web site. Which code segment should you use? ()
    A

    <%@ Page Language=VB Theme=article%>

    B

    <%@ Page Language=VB MasterPageFile=~/article.master%>

    C

    <%@ Page Language=VB ie:MasterPageFile=~/article.master%>

    D

    <%@Page Language=VB all:MasterPageFile=~/article.master%>


    正确答案: C
    解析: 暂无解析