Latest MCPD 70-519 Dumps Real Exam Download 51-60

Ensurepass

QUESTION 51

You are evaluating an ASP.NET Web application that includes three methods: -Calculate() performs CPU-intensive calculations on the server. -GetData() retrieves data from a server-side data store and returns an XML file. -WriteData() receives an XML file and writes data from the file to a server-side data store.

You need to recommend an approach for maximizing server throughput. What should you recommend?

 

A. Synchronous processing for the GetData() and WriteData() methods.

B. Synchronous processing for the WriteData() and Calculate() methods.

C. Asynchronous processing for the GetData() and Calculate() methods.

D. Asynchronous processing for the GetData() and WriteData() methods.

 

Correct Answer: D

Explanation/Reference:

Only GetData and WriteData can run in asynchronous (the operations do not require CPU performance)

 

 

clip_image002[4]

 

A. Move the Web tier to a Web farm.

B. Move the application tier to a Web farm.

C. Use a clustered database server configuration.

D. Partition the tables and indexes in the database.

 

Correct Answer: BCExplanation/Reference:

 

 

QUESTION 53

You are designing an ASP.NET MVC 2 Web application that will contain reusable markup.

The Web application must read data from the TempData dictionary.

You need to recommend a solution that allows the Web application to pass data between pages by using the TempData dictionary.

What should you recommend?

 

A. Design a view user control and enable ViewState.

B. Design a view user control and enable Session state.

C. Use a Substitution control and enable ViewState.

D. Use a Substitution control and enable Session state.

 

Correct Answer: B

Explanation/Reference:

 

 

QUESTION 54

You are designing an ASP.NET Web application that allows user input. You have the following requirements:

-Use client-side state management.

-Prevent users from accidentally modifying data.

-Automatically encode data.

-Preserve data during a page postback.

You need to recommend the appropriate type of state management.

Which type should you recommend?

 

A. view state

B. session state

C. a hidden field

D. the query string

 

Correct Answer: A

Explanation/Reference:

 

 

QUESTION 55

You are designing an ASP.NET Web application.

A page of the Web application will contain a databound ListView control.

You need to recommend a strategy for accessing individual rows within the ListView control from client-side script based on the value in a specific data field.

What should you recommend?

 

A. On the @ Page directive, set the AspCompat property to True and set the ClientIDMode property to Predictable.

B. On the @ Page directive, set the SmartNavigation property to True and set the ClientIDMode property to AutoID.

C. On the ListView control, set the ClientIdMode property to Static and set the ClientIdRowSuffix property to the name of the data field.

D. On the ListView control, set the ClientIdMode property to Predictable and set the ClientIdRowSuffix property to the name of the data field.

 

Correct Answer: D

Explanation/Reference:Predictable This algorithm is used for controls that are in data-bound controls. The ClientID value is generated by concatenating the ClientID value of the parent naming container with the ID value of the control. If the control is a data-bound control that generates multiple rows, the value of the data field specified in the ClientIDRowSuffix property is added at the end. For the GridView control, multiple data fields can be specified. If the ClientIDRowSuffix property is blank, a sequential number is added at the end instead of a data field value. Each segment is separated by an underscore character (_).

 

 

QUESTION 56

You are designing an ASP.NET Web application.

The Web application must instruct proxy servers between the server and the browser to not cache content.

You need to recommend an approach for instructing the proxy servers.

What should you recommend?

 

A. Use the Response.Cache.SetNoTransforms() method.

B. Use the Response.Cache.SetVaryByCustom() method with a value of no-proxy.

C. Use the Response.Cache.AppendCacheExtension() method with a value of no-proxy.

D. Use the Response.Cache.SetCacheability() method with a value of HttpCacheability.ServerAndPrivate.

 

Correct Answer: D

Explanation/Reference:

HttpCacheability Enumeration

NoCache Sets the Cache-Control: no-cache header. Without a field name, the directive applies to the entire request and a shared (proxy server) cache must force a successful revalidation with the origin Web server before satisfying the request. With a field name, the directive applies only to the named field; the rest of the response may be supplied from a shared cache.

Private Default value. Sets Cache-Control: private to specify that the response is cacheable only on the client and not by shared (proxy server) caches.

Server Specifies that the response is cached only at the origin server. Similar to the NoCache option.

Clients receive a Cache-Control: no-cache directive but the document is cached on the origin server.

Equivalent to ServerAndNoCache. ServerAndNoCache Applies the settings of both Server and NoCache to indicate that the content is cached at the server but all others are explicitly denied the ability to cache the response.

Public Sets Cache-Control: public to specify that the response is cacheable by clients and shared (proxy) caches.

ServerAndPrivate Indicates that the response is cached at the server and at the client but nowhere else.

Proxy servers are not allowed to cache the response.

http://msdn.microsoft.com/en-us/library/system.web.httpcacheability.aspx

 

 

QUESTION 57

You are modifying an existing ASP.NET Web application.

Each page of the Web application includes a navigation bar and a print button. You have the following requirements:

-Enable users to print pages of the Web site without printing the navigation bar.

-Do not create a separate version of the page formatted for printing.

Leverage the existing print button on each page. You need to recommend an approach that meets the requirements. Which two actions should you recommend? (Each correct answer presents part of the solution. Choose two.)

 

A. Add the PrintingPermission attribute to the code-behind page class.

B. In the header, add a style sheet tag that sets the media attribute to print.

C. Add an OnClientClick event handler to the print button to call the window.print() function.

D. Add an OnClick event handler to the print button to set the Response.ContentType property to style/ print.

 

Correct Answer: BCExplanation/Reference:

 

 

QUESTION 58

clip_image004[4]

A. In the Web.config file, add a globalization element with the uiCulture attribute set to auto.

B. In the Web.config file, add a globalization element with the responseEncoding attribute set to auto.

C. In the code-behind for the master page, override the OnInit() method. Set the Thread.CurrentThread.CurrentUICulture property based on the value of the Request.Browser.Capabilities[“preferredLanguage”] dictionary entry.

D. In the code-behind for the base page, override the InitializeCulture() method. Set the Thread.CurrentThread.CurrentUICulture property based on the value of the ViewState[“Accept-Language”] dictionary entry.

 

Correct Answer: A

Explanation/Reference:

To have ASP.NET set the UI culture and culture to the first language that is specified in the current browser settings, set UICulture and Culture to auto http://msdn.microsoft.com/en-us/library/bz9tc508.aspx

 

 

QUESTION 59

You are designing an ASP.NET Web application.

Input controls on each page must accept right-to-left language input by default.

This setting must override any default browser settings.

You need to recommend a solution for configuring the input controls.

What are two possible solutions you could recommend?

(Each correct answer presents a complete solution. Choose two.)

 

A. On each of the input controls, add a dir attribute with the value rtl.

B. Wrap the collection of input controls in a div element with the dir attribute value rtl.

C. In the page code-behind, override the InitializeCulture() method and append the string -rightleft to the Page.UICulture property.

D. In the page code-behind, override the InitializeCulture() method. Set the thread s CurrentUICulture property to a new instance of the CultureInfo class with the name parameter set to the value of the Page.UICulture property and the useUserOverride parameter set to true.

 

Correct Answer: AB

Explanation/Reference:

 

 

QUESTION 60

You are designing an ASP.NET Web application. You have the following requirements:

-Relational database tables must automatically map to to .NET classes.

The data access layer must be able to target database engines other than Microsoft SQL Server. You need to recommend a data access technology. Which technology should you recommend?

 

A. LINQ to SQL

B. Entity Framework 4

C. direct ADO.NET calls

D. .NET Framework Data Provider for OLE DB

 

Correct Answer: B

Explanation/Reference:

Only Entity Framework support target database engines other than Microsoft SQL Server

 

Download Latest MCPD 70-519 Real Free Tests , help you to pass exam 100%.