PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

What should you do?

You are designing an application by using Windows Presentation Foundation (WPF) and Microsoft .NET Framework 4. The application retrieves customer data from an enterprise resource planning (ERP) system. You need to ensure that the following requirements are met:
* Customer data is retrieved only once.
* Customer data is available on multiple forms within the application.
* Forms can implement TwoWay binding to the customer data.
What should you do?

Which code segment should you use?

You use Microsoft .NET Framework 4.0 to develop an ASP.NET Web application that connects to a Microsoft SQL Server 2008 database.
The application uses Integrated Windows authentication in Internet Information Services (IIS) to authenticate users.
A connection string named connString defines a connection to the database by using integrated security.

You need to ensure that a SqlCommand executes under the application pool’s identity on the database server.
Which code segment should you use?

What should you do?

You are designing an application by using Windows Presentation Foundation (WPF) and Microsoft .NET Framework 4. You plan to create a wizard by using a Window, a Frame, and several Page objects. The wizard will use the NavigationService. The NavigationService will be invoked by buttons on the user interface (UI). You need to ensure that priorpage navigation can be disabled. What should you do?

Which code segment should you use?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that connects to a Microsoft SQL Server 2008 database.
You use the ADO.NET Entity Framework Designer to model entities. You add the following stored procedure to the database, and you add a function import to the model.

CREATE PROCEDURE [dbo].[InsertDepartment]
@Name nvarchar(50),
@ID int NULL OUTPUT
AS
INSERT INTO Department (Name) VALUES (@Name)
SELECT @ID = SCOPE_IDENTITY()

You need to insert a new department and display the generated ID. Which code segment should you use?

Which code segment should you use?

A Web page includes the HTML shown in the following code segment.

<span id=”ref”>
<a name=Reference>Check out</a> the FAQ on <a href=”http://www.contoso.com”>Contoso</a>’s web site for more information: <a href=”http://www.contoso.com/faq”>FAQ</a>.
</span>
<a href=”http://www.contoso.com/home”>Home</a>

You need to write a JavaScript function that will dynamically format in boldface all of the hyperlinks in the ref span.
Which code segment should you use?

Which two approaches could you recommend?

You are designing an ASP.NET Web application by using Microsoft Visual Studio 2010. The Web application uses dynamic HTML (DHTML).
You need to ensure that the application functions properly on multiple browser platforms without requiring the installation of a client-side component.
Which two approaches could you recommend? (Each correct answer presents a complete solution. Choose two.)

What should you use?

You are designing an application by using Windows Presentation Foundation (WPF) and Microsoft .NET Framework 4. The application will run on Windows 7based kiosks that are located indoors and outdoors. The kiosk displays have a photo sensor that will update the application with the current ambient luminosity. You need to ensure that the user interface (UI) of the application dynamically changes the application theme based on the ambient luminosity.
What should you use?

Which line of code should you use?

You use Microsoft .NET Framework 4.0 to develop an application that exposes a WCF Data Services endpoint.
The endpoint uses an authentication scheme that requires an HTTP request that has the following header format.

GET /OData.svc/Products(1)
Authorization: WRAP access_token “123456789”

You add the following method to your DataService implementation.

01 protected override void OnStartProcessingRequest(ProcessRequestArgs args)
02 {
03 ….
04 }

You need to ensure that the method retrieves the authentication token. Which line of code should you use?