单选题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? ()ASet Page.MasterPageFile in the Page's Page_Init event.BSet Page.MasterPageFile in the Page's OnInit override.CSet Page.MasterPageFile in the Page's Page_Load event.DSet Page.MasterPageFile in the Page's Page_PreInit event.

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

C

Set Page.MasterPageFile in the Page's Page_Load event.

D

Set Page.MasterPageFile in the Page's Page_PreInit event.


参考解析

解析: 暂无解析

相关考题:

You create a Web site that stores users‘ active themes in user profile objects. You need to apply users‘ preferred themes when they log on to the Web site.What should you do? () A. In the InitComplete event handler, set the Theme property of the Page object based on the user profile.B. In the PreLoad event handler, set the Theme property of the Page object based on the user profile.C. In the OnLoad event handler, set the Theme property of the Page object based on the user profile.D. In the PreInit event handler, set the Theme property of the Page object based on the user profile.

You create a master page named PageBase.master. The master page contains a Label control named lblTitle.You create a content page that references the master page.You need to change the Text property of the master page‘s lblTitle control from the content page.Which code segment should you use?()A.B.C.D.

Your Web site uses custom Themes. Your Web site must support additional Themes based on the user‘s company name. The company name is set when a user logs on to the Web site. The company‘s Theme name is stored in a variable named ThemeName. You need to use this variable to dynamically set the Web site‘s Theme.What should you do?()A.B.C.D.

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.

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 application that uses data-bound GridView controls in multiple pages. You add JavaScript code to periodically update specific types of data items in these GridView controls. You need to ensure that the JavaScript code can locate the HTML elements created for each row in these GridView controls, without needing to be changed if the controls are moved from one page to another. What should you do?()A、Replace the GridView control with a ListView control.B、Set the ClientIDMode attribute to Predictable in the web.config file.C、Set the ClientIDRowSuffix attribute of each unique GridView control to a different value.D、Set the @ OutputCache directives VaryByControl attribute to the ID of the GridView control.

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.

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 create a Web Form that contains a button named btnCancel that enables users to exit the page. When users click this button, validation must not occur. During testing you learn that clicking the Cancel button does not enable users to exit the page. You need to ensure that users can always exit the page. What should you do?()A、Set the Enabled property of the validation controls on the Web Form to False.B、Set the CausesValidation property of the btnCancel button to False.C、Set the CausesValidation property of the btnCancel button to True.D、Set the Visible property of the validation controls on the Web Form to False.

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 developing an ASP.NET Web application. The application must pass an object that contains user-specific data between multiple pages. The object ismore than 100 KB in size when serialized.You need to minimize the amount of data is sent to the user. What should you do?()A、Pass the object data in a hidden field.B、Store the object instance in a session variable.C、Use a cookie that contains the object data.D、Encode the object data and pass it in a query string parameter.

You are developing a page named Process.aspx in a shopping cart Web application that will be integrated into Certkiller .com's existing e-Commerce Web site. The Process.aspx page allows customers to pay for purchases using their credit cards. The Process.aspx page contains a Button control that confirms the customer's payment and calls an external Web service that charges the customer's credit card. You must implement confirmation and prevent postback unless the customer confirms payment. What should you do?()A、Set the OnClientClick property to a JavaScript statement.B、Set the PostBackUrl property to a JavaScript statement.C、Set the PostBackUrl property to the URL of a confirmation page.D、Set the OnClientClick property to the URL of a confirmation page.

You are developing a Web application. The Web application restricts access to an administrative page. The Web application uses the following code segment to protect the page.If Page.User.Identity.Name "CONTOSO/Administrator" Then Response.Redirect("login.aspx")End IfYou are logged on as Administrator. When you display the page, you are redirected to Login.aspx. You discover that the User.Identity.Name property is not being correctly populated. You need to ensure that you can access the page when you are logged on as Administrator. Which two actions should you perform? ()A、In the Web.config file, enable impersonation.B、In IIS, enable anonymous access.C、In IIS, disable anonymous access.D、In the Web.config file, set the authentication mode to Windows.

You are developing a Web application. The Web application restricts access to an administrative page. The Web application uses the following code segment to protect the page.if (Page.User.Identity.Name != @"CONTOSO/Administrator") { the page, you are redirected to Login.aspx. You discover that the User.Identity.Name property is not being correctly populated. You need to ensure that you can access the page when you are logged on as Administrator. Which two actions should you perform? ()A、In the Web.config file, enable impersonation.B、In IIS, enable anonymous access.C、In IIS, disable anonymous access.D、In the Web.config file, set the authentication mode to Windows.

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

You modify an existing Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You add a theme to the ASP.NET application.  You need to apply the theme to override any settings of individual controls.  What should you do?()A、In the Web.config file of the application,set the Theme attribute of the pages element to the name of the theme.B、In the Web.config file of the application,set the StyleSheetThemeattribute of the pages element to the name of the theme.C、Add a master page to the application. In the @Master directive,set the Theme attribute to the name of the theme.D、Add a master page to the application. In the @Master directive,set the StyleSheetTheme attribute to the name of the theme.

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.

You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication.  You decide to make use of Microsoft ASP.NET 3.5 in order to create the application. The followingmarkup is present on the page:      " ="" selectcommand="GetUsers" selectcommandtype="StoredProcedure" filterexpression="Active=1 AND Name LIKE ’{0}%’">            The page is used to retrieve the Users from a company database. However, only the active usersare displayed. The TextBox control allows you to also filter users by status. You do not specify astatus when you click the Filter button. You notice that the page does not filter by active users andshows all the users that are retrieved from the database. You need to make the necessary settingsto ensure that only the active users are being displayed on the page when a status is notspecified.  What should you do?()A、You should ensure that a default value for the Status property of the ControlParameter controlis set.B、You should ensure that the PropertyName property of the ControlParameter control is set toText.C、You should ensure that the ControlParameter control’s ConvertEmptyStringToNull property isset to false.D、You should ensure that the {0} placeholder in the FilterExpression property is replaced with the(?) symbol.

单选题You create a Web site that stores users' active themes in user profile objects. You need to apply users' preferred themes when they log on to the Web site. What should you do? ()AIn the InitComplete event handler, set the Theme property of the Page object based on the user profile.BIn the PreLoad event handler, set the Theme property of the Page object based on the user profile.CIn the OnLoad event handler, set the Theme property of the Page object based on the user profile.DIn the PreInit event handler, set the Theme property of the Page object based on the user profile.

多选题You are developing a Web application. The Web application restricts access to an administrative page. The Web application uses the following code segment to protect the page.if (Page.User.Identity.Name != @"CONTOSO/Administrator") { the page, you are redirected to Login.aspx. You discover that the User.Identity.Name property is not being correctly populated. You need to ensure that you can access the page when you are logged on as Administrator. Which two actions should you perform? ()AIn the Web.config file, enable impersonation.BIn IIS, enable anonymous access.CIn IIS, disable anonymous access.DIn the Web.config file, set the authentication mode to Windows.

单选题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?()ASetPage.MasterPageFile in the Page’sPage_Initevent.BSetPage.MasterPageFile in the Page’sOnInit event.CSetPage.MasterPageFile in the Page’sPage_Loadevent.DSetPage.MasterPageFile in the Page’sPage_PreInitevent.

单选题You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication.  You decide to make use of Microsoft ASP.NET 3.5 in order to create the application. The followingmarkup is present on the page:      "  SelectCommand="GetUsers" SelectCommandType="StoredProcedure"  FilterExpression="Active=1 AND Name LIKE ’{0}%’"            The page is used to retrieve the Users from a company database. However, only the active usersare displayed. The TextBox control allows you to also filter users by status. You do not specify astatus when you click the Filter button. You notice that the page does not filter by active users andshows all the users that are retrieved from the database. You need to make the necessary settingsto ensure that only the active users are being displayed on the page when a status is notspecified.  What should you do?()AYou should ensure that a default value for the Status property of the ControlParameter controlis set.BYou should ensure that the PropertyName property of the ControlParameter control is set toText.CYou should ensure that the ControlParameter control’s ConvertEmptyStringToNull property isset to false.DYou should ensure that the {0} placeholder in the FilterExpression property is replaced with the(?) symbol.

单选题You are developing an ASP.NET Web application. The application must pass an object that contains user-specific data between multiple pages. The object ismore than 100 KB in size when serialized.You need to minimize the amount of data is sent to the user. What should you do?()APass the object data in a hidden field.BStore the object instance in a session variable.CUse a cookie that contains the object data.DEncode the object data and pass it in a query string parameter.

单选题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?()AYour best option would be to insert Page.RegisterRequiresPostBack(this)BYour best option would be to insert Page.RegisterRequiresControlState(this)CYour best option would be to insert Page.UnregisterRequiresControlState(this)DYour best option would be to insert Page.RegisterStartupScript(KingShare,server)

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

单选题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? ()ASet Page.MasterPageFile in the Page's Page_Init event.BSet Page.MasterPageFile in the Page's OnInit override.CSet Page.MasterPageFile in the Page's Page_Load event.DSet Page.MasterPageFile in the Page's Page_PreInit event.

单选题You modify an existing Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You add a theme to the ASP.NET application.  You need to apply the theme to override any settings of individual controls.  What should you do?()AIn the Web.config file of the application,set the Theme attribute of the pages element to the name of the theme.BIn the Web.config file of the application,set the StyleSheetThemeattribute of the pages element to the name of the theme.CAdd a master page to the application. In the @Master directive,set the Theme attribute to the name of the theme.DAdd a master page to the application. In the @Master directive,set the StyleSheetTheme attribute to the name of the theme.