PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

Which code segment should you use?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application that uses LINQ to SQL.
The application contains the following model.

Each region contains a single vendor. Customers order parts from the vendor that is located in their region.
You need to ensure that each row in the Customer table references the appropriate row from the Vendor table.
Which code segment should you use?

Which event handler should you add?

You are implementing an ASP.NET page in an e-commerce application.
Code in a btnAddToCart_Click event handler adds a product to the shopping cart.
The page should check the status of the shopping cart and always show a cart icon when one or more items are in the shopping cart.
The page should hide the icon when the shopping cart has no items.
You need to add an event handler to implement this requirement.
Which event handler should you add?

Which two approaches should you recommend?

You are designing an ASP.NET Web application.
You have the following requirements:
Users must be allowed to save their work in progress on one computer and to continue the work on another computer.
Data that is submitted for processing must be valid, and invalid data must be rejected.
Primary key constraints within the database must be enabled at all times.
The application must store only data that is entered by the user.
You need to design data validation to support the requirements.
Which two approaches should you recommend? (Each correct answer presents part of the solution. Choose two.)

Which control markup should you use?

You are implementing an ASP.NET Web site that will be accessed by an international audience.
The site contains global and local resources for display elements that must be translated into the language that is selected by the user.
You need to ensure that the Label control named lblCompany displays text in the user’s selected language from the global resource file.
Which control markup should you use?

What should you do?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server 2008 database. The database includes a table that contains information about all the employees. The database table has a field named EmployeeType that identifies whether an employee is a Contractor or a Permanent employee. You declare the Employee entity base type. You create a new Association entity named Contractor that inherits the Employee base type. You need to ensure that all Contractors are bound to the Contractor class. What should you do?

What should you do?

You use Microsoft .NET Framework 4.0 to develop an application that uses LINQ to SQL. The LINQ to SQL model contains the Product entity.
A stored procedure named GetActiveProducts performs a query that returns the set of active products from the database.
You need to invoke the stored procedure to return the active products, and you must ensure that the LINQ to SQL context can track changes to these entities. What should you do?