考题
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. 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 control named ContosoUI for a Web application. You need to add the control to the toolbox of Microsoft Visual Studio .NET. Which two actions should you perform?()A、Create the ContosoUI control as a Web Control Library.B、Create the ContosoUI control as a Web user control.C、Within the Visual Studio .NET toolbox, browse to and select ContosoUI.ascx.D、Within the Visual Studio .NET toolbox, browse to and select ContosoUI.dll.
考题
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 work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visual Studio .NET 2010 as its application development platform. You are creating an ASP.NET Web application using .NET Framework 4.0. The Web application comprises a class named Employee with properties named as First Name, Last Name, and Age. You add a Web page in which you get a list of Employee objects and display those objects in a GridView control. You are required to add code so that the GridView row is highlighted in red color if the age of the employee is less than 21 years. What will you do to accomplish this?()A、Use the RowCommand event of the GridView control.B、Use the SelectedlndexChanged event of the GridView control.C、Use the RowDataBound event of the GridView control.D、Use the RowEditing event of the GridView control.E、Use the RowUpdated event of the GridView control.
考题
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 host the application on a server named ContosoTest that runs Microsoft IIS 6.0. You set up remote debugging on the ContosoTest server. You need to debug the application remotely from another computer named ContosoDev. What should you do?()A、Attach Microsoft Visual Studio.NET to the w3wp.exe process. B、Attach Microsoft Visual Studio.NET to the inetinfo.exe process. C、Attach Microsoft Visual Studio.NET to the Msvsmon.exe process. D、Attach Microsoft Visual Studio.NET to the WebDev.WebServer.exe process.
考题
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 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"/ | English | Chinese | Japan | Korean | - 124 - Test Information Co., Ltd. All rights reserved. ’ 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 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 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 Web page that has a GridView control named GridView1. The GridView1 control displays the data from a database named Region and a table named Location. You write the following code segment to populate the GridView1 control. (Line numbers are included for reference only.) 01 Protected Sub Page_Load(ByVal sender As Object, _ ByVal e As EventArgs) 02 Dim connstr As String 03 ... 04 SqlDependency.Start(connstr) 05 Using connection As New SqlConnection(connstr) 06 Dim sqlcmd As New SqlCommand() 07 Dim expires As DateTime = DateTime.Now.AddMinutes(30) 08 Dim dependency As SqlCacheDependency = _ 09 New SqlCacheDependency("Region", "Location") 10 Response.Cache.SetExpires(expires) 11 Response.Cache.SetValidUntilExpires(True) 12 Response.AddCacheDependency(dependency) 13 14 sqlcmd.Connection = connection 15 GridView1.DataSource = sqlcmd.ExecuteReader() 16 GridView1.DataBind() 17 End Using 18 End Sub You need to ensure that the proxy servers can cache the content of the GridView1 control. Which code segment should you insert at line 13? () | English | Chinese | Japan | Korean | - 90 - Test Information Co., Ltd. All rights reserved.A、Response.Cache.SetCacheability(HttpCacheability.Private) B、Response.Cache.SetCacheability(HttpCacheability.Public) C、Response.Cache.SetCacheability(HttpCacheability.Server) D、Response.Cache.SetCacheability(HttpCacheability.ServerAndPrivate)
考题
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application resides on a server named ContosoTest that runs Microsoft IIS 5.0. You use a computer named ContosoDev to log on to the Contoso.com domain with an account named ContosoUser. The ContosoTest and ContosoDev servers are members of the Contoso.com domain. You need to set up the appropriate permission for remote debugging. What should you do?()A、Set the Remote Debugging Monitor to use Windows Authentication. B、Add the ContosoUser account to the domain Administrators group.C、Add the ContosoUser account to the local Administrators group on the ContosoTest server. D、Change the ASP.NET worker process on the ContosoTest server to run as the local Administrator account.
考题
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") %'
考题
ou create a page in an ASP.NET Web application. The page retrieves and displays data from a Microsoft SQL Server database. You need to create a data source that can connect to the database. What are two possible ways to achieve this goal?()A、Use an ObjectDataSource control and set its TypeName property to System.Data.SqlClient.SqlConnection.B、Use a SqlDataSource control and configure its ConnectionString in the web.config file.C、Use an XmlDataSource control together with an Xml control that represents the database.D、Use a LinqDataSource control with entity classes that represent the elements in the database.
考题
单选题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?()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. 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 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?()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-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 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-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 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