What should you do?
You are designing a new feature for an existing Windows Forms application by using Microsoft .NET Framework 4. The application contains multiple forms that are loaded into a parent Multiple Document Interface (MDI) form. Your company policy does not allow the use of thirdparty controls. You need to ensure that the new feature meets the following requirements:
* It provides a threedimensional scale model.
* It allows users to change the colors of the model and communicates the color selections back to the application.
* It allows the model to scale, based on the user’s client computer display resolution.
* It is a child form in the MDI application.
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.
You use the ADO.NET Entity Framework Designer to model entities.
You need to associate a previously deserialized entity named person1 to an object context named model and persist changes to the database.
Which code segment should you use?
What should you do?
You are implementing a Web page that displays text that was typed by a user.
You need to display the user input in the Web page so that a cross-site scripting attack will be prevented.
What should you do?
Which two code segments should you use?
You are implementing an ASP.NET Web page.
You need to add a text box that allows only values between 1 and 10, inclusive, to be submitted. Which two code segments should you use? (Each correct answer presents part of the solution. Choose two.)
What should you do?
You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You add a custom command as a resource. The key of the command is saveCommand. You write the following code fragment. (Line numbers are included for reference only.)
01 <Canvas>
02
03 <Button>
04
05 </Button>
06 </Canvas>
You need to ensure that saveCommand is executed when the user clicks the Button control. What should you do?
Which code segment should you use?
You use Microsoft .NET Framework 4.0 to develop an application that connects to a local Microsoft SQL Server 2008 database.
The application can access a high-resolution timer. You need to display the elapsed time, in sub-milliseconds (<1 millisecond),
that a database query takes to execute. Which code segment should you use?
What should you do?
You create a Web page that has an ASP.NET menu.
You need to ensure that the menu items are populated from an array of strings in your code-behind file.
What should you do?
What should you do?
You are dynamically adding controls to an ASP.NET page in the Page_Load event handler. The page will have text boxes that correspond to the columns in a database table. Each text box will be preceded by a label that displays the name of the corresponding column.
You need to create the form so that when the user clicks the label, the corresponding text box is selected for input.
What should you do?
What should you do?
You are designing a Windows Presentation Foundation (WPF) application by using Microsoft .NET Framework 4 and Microsoft Visual Studio 2010. The application will be deployed on Windows 7 computers in the United States and Europe. You need to ensure that array data is sorted based on the culture of the operating system. 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 uses the ADO.NET
Entity Framework to model entities. You create an entity model as shown in the following diagram.
You need to ensure that all Person entities and their associated EmailAddresses are loaded. Which code segment should you use?