Web Developer Framework 4.0 Sample Questions – 28

Question: You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You use Microsoft ADO.NET Entity Data Model (EDM) to model entities.
You create an entity named Person with a schema defined by the following XML fragment.
<EntityType Name="CPerson">
<Key>
<PropertyRef Name="PersonId" />
</Key>
<Property Name="PersonId" Type="Int32" Nullable="false" />
<Property Name="CompanyName" Type="String" />
<Property Name="ContactName" Type="String" />
<Property Name="ContactTitle" Type="String" />
<Property Name="Address" Type="String" />
</EntityType>

You need to ensure that entities within the application are able to add properties related to the city, region, and country of Person’s address.
What should you do

  1. Create a new complex type named CAddress that contains the properties for city, region, and country. Change the Type of the Address property in CPerson to “Self.CAddress”.
  2. Create a SubEntity named Address. Map the SubEntity to a stored procedure that retrieves city, region, and country.
  3. Create a new entity named Address. Add a person ID property to filter the results to display only the City, Region, and Country properties for a specific Person entity.
  4. Create a view named Name that returns city, region, and country along with person IDs. Add a WHERE clause to filter the results to display only the City, Region and Country properties for a specific Person entity.

Correct Answer: 1


Question: 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

  1. Modify the .edmx file to include the following line of code.
    <NavigationProperty Name="Type" FromRole="EmployeeType" ToRole="Contractor" />
  2. Modify the .edmx file to include the following line of code.
    <Condition ColumnName="EmployeeType" Value="Contractor" />
  3. Use the Entity Data Model Designer to set up an association between the Contractor class and EmployeeType.
  4. Use the Entity Data Model Designer to set up a referential constraint between the primary key of the Contractor class and EmployeeType.

Correct Answer: 2


Question: You are designing an ASP.NET Web application for online image editing. Users can upload images to the Web application and edit those images by using utilities provided by the application. Some utilities are processor intensive and should be offloaded to a Graphics Processing Unit (GPU). Other utilities require the use of proprietary algorithms that must be performed on the server.You need to design a solution for minimizing bandwidth usage and Web server response times during image processing, while providing a responsive application. Which two approaches should you recommend (Each correct answer presents part of the solution. Choose two.)

  1. Perform server-side image processing on the Web server.
  2. Perform server-side image processing on a dedicated server.
  3. Perform client-side image processing by using ASP.NET AJAX.
  4. Perform client-side image processing by using Microsoft Silverlight.

Correct Answer: 2 & 4


Question: You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You use the ADO.NET Entity Framework to model your entities. You use Plain Old CLR Objects (POCO) entities along with snapshot-based change tracking. The code accesses the POCO entities directly. You need to ensure that the state manager synchronizes when changes are made to the object graph. Which ObjectContext method should you call

  1. Refresh
  2. SaveChanges
  3. DetectChanges
  4. ApplyPropertyChanges

Correct Answer: 3


Question: 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

  1. btnAddToCart_Click
  2. Page_Load
  3. Page_PreRender
  4. Page_PreInit

Correct Answer: 3


Question: You create an ASP.NET page named TestPage.aspx that contains validation controls. You need to verify that all input values submitted by the user have been validated by testing the Page.IsValid property. Which page event should you add an event handler to

  1. Init
  2. Load
  3. PreInit
  4. PreLoad

Correct Answer: 2

Tagged . Bookmark the permalink.

Leave a Reply