Ensurepass

QUESTION 11

You need to make all of the rows in the table bold in the Views/RunLog/GetLog.cshtml view. Which code segment should you use?

 

A.

Table > th:last-child { font-weight: bold; }

B.

Table+first-child{ font-weight: bold; }

C.

Table>tr>th:nth-child{2){font-weight: bold; }

D.

Table > tr { font-weight: bold; }

 

Correct Answer: D

 

 

QUESTION 12

You need to display the “miles” unit description after the distance in the GetLog view. Which line of code should you use to replace line GL21? (Each correct answer presents a complete solution. Choose all that apply.)

 

A.

@log.Distance miles

B.

@Htrml.DisplayFor(model => log.Distance) miles

C.

@log.Distance.ToStringO @Html.TextArea (“miles”)

D.

@Htmi.DisplayFor(model => log.Distance.ToString() + ” miles”)

 

Correct Answer: AB

 

 

QUESTION 13

You need to ensure that new customers enter a valid email address. Which code should you use? (Each correct answer presents part of the solution. Choose all that apply.)

 

image034

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: AD

 

 

 

QUESTION 14

You are designing a Windows Communication Foundation (WCF) service that uses the Product class. You need to update the class to meet the storage requirement. What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

 

A.

Mark the Product class with the DataContract attribute.

B.

Mark the public members of the Product class with the DataContractFormat attribute.

C.

Mark the Product class with the CollectionDataContract attribute.

D.

Mark the public members of the Product class with the DataMember attribute.

 

Correct Answer: AD

 

 

QUESTION 15

You need to implement the requirements for handling IIS errors. What should you do?

 

image036

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: A

 

 

QUESTION 16

You need to add a method to the ProductController class to meet the exception handling requirements for logging. Which code segment should you use?

 

image038

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: A

 

 

QUESTION 17

An advertising campaign was recently launched. Some of the ads contain a link to products that no longer exist or have IDs that have changed. You need to ensure that all product links display a product. Which code segment should you use to configure the route?

 

image040

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: A

 

 

QUESTION 18

You need to modify the application to meet the productId requirement. What should you do?

 

A.

Modify the RegisterGlobalFilters method of the Global.asax.es file as follows. Contract.Assume<ArgumentException>(productId != 0);

B.

Modify the GetDealPrice method of ProductController as follows. Contract.Requires<ArgumentException>(productId > 0);

C.

Modify the RegisterGlobalFilters method of the Global.asax.es file as follows. Contract.Requires<ArgumentException>(productId > 0);

D.

Modify the GetDealPrice method of ProductController as follows. Contract.Assume<ArgumentException>(productId > 0);

 

Correct Answer: B

Explanation:

The Contract.Requires(Of TException) method specifies a precondition contract for the enclosing method or property, and throws an exception if the condition for the contract fails.

 

Syntax:

‘Declaration

Public Shared Sub Requires(Of TException As Exception) ( _ condition As Boolean _

)

Type Parameters

TException

The exception to throw if the condition is false.

Parameters

condition

Type: System.Boolean

The conditional expression to test.

 

Reference:

Contract.Requires(Of TException) Method (Boolean)

 

 

QUESTION 19

You need to implement the business requirements for managing customer data. What should you do? (Each correct answer presents part of the solution. Choose all that apply.)

 

A.

Add a class named Customer-Controller to the Controllers folder. Then add a method named Edit to the class.

B.

Create a new controller named Administration in the Controllers folder. Add an action named EditCustomer to the controller.

C.

Add a folder named Customer to the Views folder. Then create a view inside this folder named Edit.aspx.

D.

Create a new folder named EditCustomer to the Views folder. In the new folder, create a new file named Administration.aspx.

 

Correct Answer: AC

 

 

QUESTION 20

When users attempt to retrieve a product from the product page, a run-time exception occurs if the product does not exist. You need to route the exception to the CustomException.aspx page. Which method should you add to MvcApplication?

 

image042

 

A.

Option A

B.

Option B

C.

Option C

D.

Option D

 

Correct Answer: B

 

Instant Access to Download Latest Complete Collection of Microsoft 70-486 Real Exam

Try Microsoft 70-486 Free Demo