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


参考解析

解析: 暂无解析

相关考题:

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 interface B、the INamingContainer interface C、the IRequiresSessionState interfaceD、the IPostBackDataHandler interface

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a page that contains the following code fragment:       You write the following code segment in the code-behind file for the page:   void BindData(object sender, EventArgs e) {   lstLanguages.DataSource =  CultureInfo.GetCultures(CultureTypes.AllCultures);   lstLanguages.DataTextField = "EnglishName";  lstLanguages.DataBind();   }   You need to ensure that the lstLanguages ListBox control maintains the selection of the user during postback.  Which line of code should you insert in the constructor of the page?()A、this.Init += new EventHandler(BindData); B、this.PreRender += new EventHandler(BindData); C、lstLanguages.PreRender += new EventHandler(BindData); D、lstLanguages.SelectedIndexChanged += new EventHandler(BindData);

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You plan to deploy the application to a test server.  You need to ensure that during the initial request to the application, the code-behind files for the Web pages are compiled. You also need to optimize the performance of the application.  Which code fragment should you add to the Web.config file?()A、compilation debug="true" B、compilation debug="false" C、compilation debug="true" batch="true" D、compilation debug="false" batch="false"

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. When you access the application in a Web browser, you receive the following error message: "Service Unavailable".  You need to access the application successfully.  What should you do?()A、Start Microsoft IIS 6.0. B、Start the Application pool. C、Set the .NET Framework version. D、Add the Web.config file for the application.

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You create a Web page to display photos and captions. The caption of each photo in the database can be modified by using the application. You write the following code fragment.  | English | Chinese | Japan | Korean | - 123 - Test Information Co., Ltd. All rights reserved.    ’ runat="server"/         ’ runat="server" /        When you access the Web page, the application throws an error.  You need to ensure that the application successfully updates each caption and stores it in the database.  What should you do? ()A、Add the ID attribute to the Label control.B、Add the ID attribute to the TextBox control.C、Use the Bind function for the Label control instead of the Eval function.D、Use the Eval function for the TextBox control instead of the Bind function.

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a Web form and add the following code fragment:         ’ /         The SqlDataSource1 DataSource control retrieves the Quantity column values from a table named Products.  You write the following code segment to create the rptData_ItemDataBound event handler:   01 protected void rptData_ItemDataBound(object sender,   02   RepeaterItemEventArgs e)   03 {   04 ►  05   if(lbl != null)   06     if(int.Parse(lbl.Text)  10)   07       lbl.ForeColor = Color.Red;   08 } You need to retrieve a reference to the lblQuantity Label control into a variable named lbl. Which code segment should you insert at line 04? ()A、Label lbl = Page.FindControl("lblQuantity") as Label; B、Label lbl = e.Item.FindControl("lblQuantity") as Label; C、Label lbl = rptData.FindControl("lblQuantity") as Label; D、Label lbl = e.Item.Parent.FindControl("lblQuantity") as Label;

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You create a custom-templated server control.  | English | Chinese | Japan | Korean | - 112 - Test Information Co., Ltd. All rights reserved. You need to ensure that the child controls of the server control are uniquely identified within thecontrol hierarchy of the page.  Which interface should you implement? ()A、the ITemplatable interfaceB、the INamingContainer interfaceC、the IRequiresSessionState interfaceD、the IPostBackDataHandler 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. (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");

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 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 create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a Web page to display photos and captions. The caption of each photo in the database can be modified by using the application. You write the following code fragment:         ’ runat="server"/             ’ runat="server" /             When you access the Web page, the application throws an error.  You need to ensure that the application successfully updates each caption and stores it in the database.  What should you do?()A、Add the ID attribute to the Label control. B、Add the ID attribute to the TextBox control. C、Use the Bind function for the Label control instead of the Eval function. D、Use the Eval function for the TextBox control instead of the Bind function.

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 create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application contains a DataSourceControl named CategoriesDataSource that is bound to a Microsoft SQL Server 2005 table. The CategoryName column is the primary key of the table. You write the following code fragment in a FormView control:   01    02   Category:   03      09      10     You need to ensure that the changes made to the CategoryID field can be written to the database.  Which code fragment should you insert at line 04?()A、SelectedValue='%# Eval("CategoryID") %' B、SelectedValue='%# Bind("CategoryID") %' C、SelectedValue='%# Eval("CategoryName") %' D、SelectedValue='%# Bind("CategoryName") %'

单选题You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a page that contains the following code fragment:       You write the following code segment in the code-behind file for the page:   void BindData(object sender, EventArgs e) {   lstLanguages.DataSource =  CultureInfo.GetCultures(CultureTypes.AllCultures);   lstLanguages.DataTextField = "EnglishName";  lstLanguages.DataBind();   }   You need to ensure that the lstLanguages ListBox control maintains the selection of the user during postback.  Which line of code should you insert in the constructor of the page?()Athis.Init += new EventHandler(BindData); Bthis.PreRender += new EventHandler(BindData); ClstLanguages.PreRender += new EventHandler(BindData); DlstLanguages.SelectedIndexChanged += new EventHandler(BindData);

单选题You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You create a Web page to display photos and captions. The caption of each photo in the database can be modified by using the application. You write the following code fragment.  | English | Chinese | Japan | Korean | - 123 - Test Information Co., Ltd. All rights reserved.    ’ runat="server"/         ’ runat="server" /        When you access the Web page, the application throws an error.  You need to ensure that the application successfully updates each caption and stores it in the database.  What should you do? ()AAdd the ID attribute to the Label control.BAdd the ID attribute to the TextBox control.CUse the Bind function for the Label control instead of the Eval function.DUse the Eval function for the TextBox control instead of the Bind function.

单选题You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a Web form in the application by using the following code fragment:   01     02 protected void Button_Handler(object sender, EventArgs e)   03 {   04   // some long-processing operation.  05 }   06    07  A AB BC CD D

单选题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?()APage.RegisterRequiresPostBack(this); BPage.RegisterRequiresControlState(this); CPage.UnregisterRequiresControlState(this); DPage.RegisterStartupScript(SharedControl,server);

单选题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.    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?()APage.RegisterRequiresPostBack(this);BPage.RegisterRequiresControlState(this);CPage.UnregisterRequiresControlState(this);DPage.RegisterStartupScript(SharedControl,server);

单选题You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  When you access the application in a Web browser, you receive the following error message: "Service Unavailable".  You need to access the application successfully.  What should you do?()AStart Microsoft IIS 6.0.BStart the Application pool.CSet the .NET Framework version.DAdd the Web.config file for the application.

单选题You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.  You create a custom-templated server control.  | English | Chinese | Japan | Korean | - 112 - Test Information Co., Ltd. All rights reserved. You need to ensure that the child controls of the server control are uniquely identified within thecontrol hierarchy of the page.  Which interface should you implement? ()Athe ITemplatable interfaceBthe INamingContainer interfaceCthe IRequiresSessionState interfaceDthe IPostBackDataHandler interface

单选题You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a Web page to display photos and captions. The caption of each photo in the database can be modified by using the application. You write the following code fragment:         ’ runat="server"/             ’ runat="server" /             When you access the Web page, the application throws an error.  You need to ensure that the application successfully updates each caption and stores it in the database.  What should you do?()AAdd the ID attribute to the Label control. BAdd the ID attribute to the TextBox control. CUse the Bind function for the Label control instead of the Eval function. DUse the Eval function for the TextBox control instead of the Bind function.

单选题You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application contains a DataSourceControl named CategoriesDataSource that is bound to a Microsoft SQL Server 2005 table. The CategoryName column is the primary key of the table. You write the following code fragment in a FormView control:   01    02   Category:   03      09      10     You need to ensure that the changes made to the CategoryID field can be written to the database.  Which code fragment should you insert at line 04?()ASelectedValue='%# Eval(CategoryID) %' BSelectedValue='%# Bind(CategoryID) %' CSelectedValue='%# Eval(CategoryName) %' DSelectedValue='%# Bind(CategoryName) %'

单选题You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a Web form in the application by using the following code fragment:   01     02 protected void Button_Handler(object sender, EventArgs e)   03 {   04   // some long-processing operation.  05 }   06    07  AABBCCDD

单选题You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You plan to deploy the application to a test server.  You need to ensure that during the initial request to the application, the code-behind files for the Web pages are compiled. You also need to optimize the performance of the application.  Which code fragment should you add to the Web.config file?()Acompilation debug=true Bcompilation debug=false Ccompilation debug=true batch=true Dcompilation debug=false batch=false

单选题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?()Athe ITemplatable interfaceBthe INamingContainer interfaceCthe IRequiresSessionState interfaceDthe IPostBackDataHandler interface

单选题You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a Web form and add the following code fragment:         ’ /         The SqlDataSource1 DataSource control retrieves the Quantity column values from a table named Products.  You write the following code segment to create the rptData_ItemDataBound event handler:   01 protected void rptData_ItemDataBound(object sender,   02   RepeaterItemEventArgs e)   03 {   04 ►  05   if(lbl != null)   06     if(int.Parse(lbl.Text)  10)   07       lbl.ForeColor = Color.Red;   08 } You need to retrieve a reference to the lblQuantity Label control into a variable named lbl. Which code segment should you insert at line 04? ()ALabel lbl = Page.FindControl(lblQuantity) as Label; BLabel lbl = e.Item.FindControl(lblQuantity) as Label; CLabel lbl = rptData.FindControl(lblQuantity) as Label; DLabel lbl = e.Item.Parent.FindControl(lblQuantity) as Label;

单选题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?()Athe ITemplatable interface Bthe INamingContainer interface Cthe IRequiresSessionState interfaceDthe IPostBackDataHandler interface