单项选择题You are developing an ASP.NET Web application. Application data is stored in a Microsoft SQL Server 2008 database. You configure a connection string named cnnContoso. The application must cache the data that is returned from the database by using this connection string. You need to ensure that the application checks the database every 10 seconds. What should you do? ()

A.Add the following configuration to the  section of the web.config file.
B.Add the following configuration to the  section of the web.config file.
C.Add the following @ Page directive to pages that query the database.
D.Add the following @ Page directive to pages that query the database.


您可能感兴趣的试卷

你可能感兴趣的试题

1.多项选择题

You are developing an ASP.NET Web service. The following code segment implements the service.

You need to ensure that both GetProduct methods can be called from a Web client. Which two actions should you perform?()

A.Remove line 01.
B.Add the static modifier on lines 05 and 11.
C.Add the following attribute before line 10. [SoapDocumentMethod(Action="GetProductById")]
D.Modify the attribute on line 10 as follows. [WebMethod(MessageName="GetProductById")]

4.单项选择题

You are developing an ASP.NET Web page. The page contains the following markup. 
The pages code-behind file includes the following code segment. 
You need to get a reference to the Image named img. Which code segment should you add at line 06?()

A.Image img = (Image)Page.FindControl("img");
B.Image img = (Image)e.Row.FindControl("img");
C.Image img = (Image)gvModels.FindControl("img");
D.Image img = (Image)Page.Form.FindControl("img");

5.单项选择题

You are implementing an ASP.NET Web site that uses a custom server control named Task. Task is defined as shown in the following list.   
Class name: Task  
Namespace: DevControls  
Assembly: TestServerControl.dll  
Base class: System.Web.UI.WebControls.WebControl   
You copy TestServerControl.dll to the Web site‟s Bin folder.  You need to allow the Task control to be declaratively used on site pages that do not contain an explicit @ Register directive.  Which configuration should you add to the web.config file?()

A.<appSettings> <add key="Dev:Task" value="DevControls, DevControls.Task"/> </appSettings>  
B.<compilation targetFramework="4.0" explicit="false"> <assemblies> <add assembly="TestServerControl" />      </assemblies> </compilation>
C.<pages> <controls> <add assembly="TestServerControl" namespace="DevControls" tagPrefix="Dev"/>      </controls> </pages>
D.<pages> <tagMapping> <add tagType="System.Web.UI.WebControls.WebControl"  mappedTagType="DevControls </tagMapping> </pages>  

7.单项选择题Gridview: How to change the image of an image control place in each row in a gridview:()

A.ItemDataBound
B.Init 
C.Prerender 
D.<something I don‟t remember>

最新试题

You are developing an ASP.NET Web page that uses jQuery validation. The user should enter a valid email address in a text box that has ID txtEmail. The page must display "E-Mail address required" when the user does not enter an address and "Invalid e-mailaddress" when the user enters an address that is not formatted properly. You need to ensure that the appropriate error message is displayed when the text box does not contain a valid e-mail address.  Which two code segments should you add?()

题型:多项选择题

You create an ASP.NET server control in the SampleControl namespace. The control uses a JavaScript file names Refresh.js to implement AJAX functionality.You need to ensre that the JavaScript file is included in the assembly. Which two actions should you perform?()

题型:多项选择题

ou are developing an ASP.NET MVC 2 application. You create a view that will be returned by action methods in multiple controllers. You need to place the view in the appropriate folder. To which subfolder within the Views folder should you add the view?()

题型:单项选择题

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?()

题型:单项选择题

You have to store user data of 200 KB in an object. Which state management technique to use:()

题型:单项选择题

Which of the following is the correct collection of build events?()

题型:单项选择题

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?()

题型:单项选择题

You have migrated a web application from .net 3.5 to 4.0. the application hat to render same as in .net 3.5.()

题型:单项选择题

You are developing an ASP.NET Web application.The application is configured to use the membership and role providers. You need to allow all users to perform an HTTP GET for application resources, but you must allow only the user named Moderator to perform a POST operation.Which configuration should you add to the web.config file?()

题型:单项选择题

Which method of the Page class searches the page naming container for a server control with a particular identifer?()

题型:单项选择题