MCQOPTIONS
 Saved Bookmarks
				This section includes 15 Mcqs, each offering curated multiple-choice questions to sharpen your Microsoft Certification knowledge and support exam preparation. Choose a topic below to get started.
| 1. | 
                                    You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You use the ADO.NET Entity Data Model (EDM) to define a Customer entity. You need to add a new Customer to the data store without setting all the customer's properties. What should you do? | 
                            
| A. | Call the Create method of the Customer object. | 
| B. | Call the CreateObject method of the Customer object. | 
| C. | Override the Create method for the Customer object. | 
| D. | Override the SaveChanges method for the Customer object. | 
| Answer» C. Override the Create method for the Customer object. | |
| 2. | 
                                    You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application uses the ADO.NET Entity Framework to manage customer and related order records. You add a new order for an existing customer. You need to associate the Order entity with the Customer entity. What should you do? | 
                            
| A. | Set the Value property of the EntityReference of the Order entity. | 
| B. | Call the Add method on the EntityCollection of the Order entity. | 
| C. | Use the AddObject method of the ObjectContext to add both Order and Customer entities. | 
| D. | Use the Attach method of the ObjectContext to add both Order and Customer entities. | 
| Answer» B. Call the Add method on the EntityCollection of the Order entity. | |
| 3. | 
                                    You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application uses the ADO.NET Entity Framework to model entities. The application allows users to make changes to entities while disconnected from the central data store._x005F_x000D_  _x005F_x000D_ You need to ensure that when the user connects to the central data store and retrieves new data, the application meets the following requirements:_x005F_x000D_ _x005F_x000D_ Changes made to the local data store in disconnected mode are preserved._x005F_x000D_ Entities that have already been loaded into the local data store, but have not been modified by the user, are updated with the latest data._x005F_x000D_ _x005F_x000D_ What should you do? | 
                            
| A. | Call the query's Execute method by using the MergeOptions.AppendOnly option. | 
| B. | Call the query's Execute method by using the MergeOptions.OverwriteChanges option. | 
| C. | Call the Refresh method of ObjectContext by using the RefreshMode.StoreWins option. | 
| D. | Call the Refresh method of ObjectContext by using the RefreshMode.ClientWins method. | 
| Answer» E. | |
| 4. | 
                                    You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Communication Foundation (WCF) Data Services service. You discover that when an application submits a PUT or DELETE request to the Data Services service, it receives an error. You need to ensure that the application can access the service. Which header and request type should you use in the application? | 
                            
| A. | an X-HTTP-Method header as part of a POST request | 
| B. | an X-HTTP-Method header as part of a GET request | 
| C. | an HTTP ContentType header as part of a POST request | 
| D. | an HTTP ContentType header as part of a GET request | 
| Answer» B. an X-HTTP-Method header as part of a GET request | |
| 5. | 
                                    You use Microsoft Visual Studio 2010 and Microsoft ADO.NET Framework 4 to create an application. The application connects to a Microsoft SQL Server 2008 database. You use the ADO.NET LINQ to SQL model to retrieve data from the database. You use stored procedures to return multiple result sets. You need to ensure that the result sets are returned as strongly typed values. What should you do? | 
                            
| A. | Apply the FunctionAttribute and ResultTypeAttribute to the stored procedure function. Use the GetResult | 
| B. | Apply the FunctionAttribute and ParameterAttribute to the stored procedure function and directly access the strongly typed object from the results collection. | 
| C. | Apply the ResultTypeAttribute to the stored procedure function and directly access the strongly typed object from the results collection. | 
| D. | Apply the ParameterAttribute to the stored procedure function. Use the GetResult | 
| Answer» B. Apply the FunctionAttribute and ParameterAttribute to the stored procedure function and directly access the strongly typed object from the results collection. | |
| 6. | 
                                    You create English, French, and German versions of a test engine ASP.NET application you are developing for XYZ Inc. You have separate resource files for each language version.You need to deploy the appropriate resource file based on the language settings of the server. What should you do? | 
                            
| A. | Create an installer and set the Installer.Context property for each version of your application. | 
| B. | Create an installer that has a launch condition to verify the locale settings. | 
| C. | Create an installer that has a custom action to install only location-specific files. | 
| D. | Create an installer that has an MsiConfigureProduct function to install the appropriate version. | 
| Answer» D. Create an installer that has an MsiConfigureProduct function to install the appropriate version. | |
| 7. | 
                                    You plan to deploy your ASP.NET application over XYZ’s intranet. The application uses data retrieved from a Microsoft SQL Server database. You want to use SQL Server connection pooling to optimize performance. You also need to protect confidential data stored on the server while minimizing administrative costs._x005F_x000D_  _x005F_x000D_ You need to configure security for your application. What should you do? | 
                            
| A. | Use Microsoft Windows authentication in the application. Enable impersonation for users to access the SQL Server database from your application. | 
| B. | Use Microsoft Windows authentication in the application. Use a single Windows account for users to access the SQL Server database from your application. | 
| C. | Use form-based authentication in the application. Use the system administrator (sa) SQL Server login for users to access the SQL Server database from your application. | 
| D. | Use form-based authentication in the application. Assign each user a separate SQL Server login to use to access the SQL Server database from your application. | 
| Answer» C. Use form-based authentication in the application. Use the system administrator (sa) SQL Server login for users to access the SQL Server database from your application. | |
| 8. | 
                                    You create an ASP.NET page that uses images to identify areas where a user can click to initiate actions. The users of the application use Internet Explorer._x005F_x000D_ You want to provide a pop-up window when the user moves the mouse pointer over an image. You want the pop-up window to display text that identifies the action that will be taken if the user clicks the image._x005F_x000D_ What should you do? | 
                            
| A. | For each image, set the AlternateText property to specify the text you want to display, and set the ToolTip property to True. | 
| B. | For each image, set the ToolTip property to specify the text you want to display. | 
| C. | In the onmouseover event handler for each image, add code that calls the RaiseBubbleEvent() method of the System.Web.UI.WebControls.Image class. | 
| D. | In the onmouseover event handler for each image, add code that calls the ToString() method of the System.Web.UI.WebControls.Image class. | 
| Answer» C. In the onmouseover event handler for each image, add code that calls the RaiseBubbleEvent() method of the System.Web.UI.WebControls.Image class. | |
| 9. | 
                                    You create an ASP.NET application to provide corporate news and information to XYZ’s employees. The application is used by employees in New Zealand._x005F_x000D_ Default.aspx has a Web Form label control named currentDateLabel. The Page.Load event handler for Default.aspx included the following line of code:currentDateLabel.Text = DateTime.Now.ToString(“Dâ€)_x005F_x000D_ You need to ensure that the data is displayed correctly for employees in New Zealand. What should you do? | 
                            
| A. | In the Web.config file for the application, set the culture attribute of the globalization element to en-NZ. | 
| B. | In the Web.config file for the application, set the uiCulture attribute of the globalization element to en-NZ. | 
| C. | In Visual Studio .NET, set the responseEncoding attribute in the page directive for Default.aspx to UTF-8. | 
| D. | In Visual Studio .NET, save the Default.aspx page for both versions of the application by selecting Advanced Save Options from the File menu and selecting UTF-8. | 
| Answer» B. In the Web.config file for the application, set the uiCulture attribute of the globalization element to en-NZ. | |
| 10. | 
                                    You ASP.NET application manages order entry data by using a DataSet object named EXorderEntry. The EXorderEntry object includes two DataTable objects named orderNames and OrderDetails. A ForeignKeyConstraint object named orderDetailsKey is defined between the two DataTable objects._x005F_x000D_ You attempt to delete a row in orderNames while there are related rows in OrderDetails, and an exception is generated.What is the most likely cause of the problem? | 
                            
| A. | The current value of OrderDetails.KeyDeleteRule is Rule.Cascade. | 
| B. | The current value of OrderDetails.KeyDeleteRule is Rule.SetNull. | 
| C. | The current value of OrderDetails.KeyDeleteRule is Rule.SetDefault. | 
| D. | The current value of OrderDetails.KeyDeleteRule is Rule.None. | 
| Answer» E. | |
| 11. | 
                                    You are creating an ASP.NET page for selling movie tickets. Users select a region, and then they select from a list of cities in that region. The site displays the names and locations of movie theaters in the city selected by the user._x005F_x000D_ Your company, XYZ Brothers, maintains a list of theaters in a database table that includes the city, name, and street address of each theater. You want to minimize the time required to retrieve and display the list of theater names after a user selects the region and city._x005F_x000D_ Â _x005F_x000D_ Â What should you do? | 
                            
| A. | Modify the connection string to add the packet size property and set its values to 8192. | 
| B. | Add the following directive to the page: OutputCache VaryByParam=? | 
| C. | Add the following directive to the page: OutputCache VaryByControl=?region;city? | 
| D. | Modify the connection string to keep your database's connection pool as small as possible. | 
| Answer» C. Add the following directive to the page: OutputCache VaryByControl=?region;city? | |
| 12. | 
                                    You are creating an ASP.NET page for a travel service. The page contains a CheckBoxList control that contains travel destinations. Customer can select favorite destinations to receive weekly e-mail updates of travel packages._x005F_x000D_  _x005F_x000D_ The CheckBoxList control is bound to a database table of possible destinations. Each destination is ranked according to its popularity. You modify the page to sort the destination list by rank, from the most popular to the least popular. The list has three columns._x005F_x000D_  _x005F_x000D_ You want the most popular destination to be on the top row of the check box list at run time. Which property setting should you use for the CheckBoxList control? | 
                            
| A. | Set the RepeatDirection property to Vertical. | 
| B. | Set the RepeatDirection property to Horizontal. | 
| C. | Set the RepeatLayout property to Flow. | 
| D. | Set the RepeatLayout property to Table. | 
| Answer» C. Set the RepeatLayout property to Flow. | |
| 13. | 
                                    You are creating an ASP.NET application for XYZ. The company data is stored in a Microsoft SQL Server 6.5 database. Your application generates accounting summary reports based on transaction tables that contain million of rows._x005F_x000D_ You want your application to return each summary report as quickly as possible. You need to configure your application to connect to the database and retrieve the data in a away that achieves this goal._x005F_x000D_ What should you do? | 
                            
| A. | Use a SqlConnection object to connect to the database, and use a SqlCommand object to run a stored procedure that returns the data. | 
| B. | Use an OleDbConnection object to connect to the database, and use an OleDbCommand object to run a stored procedure that returns the data. | 
| C. | Configure SQL Server to support HTTP access, and create an XML template to run a stored procedure that returns the data in XML format. | 
| D. | Use COM interop to create an ADODB.Connection object, and use an ADODB.Command object to run a SQL statement that returns the data. | 
| Answer» C. Configure SQL Server to support HTTP access, and create an XML template to run a stored procedure that returns the data in XML format. | |
| 14. | 
                                    You are a Web developer for XYZ. You create an ASP.NET application that accesses sales and marketing data. The data is stored in a Microsoft SQL Server 2000 database on a server named XYZ01._x005F_x000D_ The company purchases a factory automation software application. The application is installed on XYZ01, where it creates a second instance of SQL Server 2000 named Factory and a database named FactoryDB. You connect to FactoryDB by using Windows Integrated authentication._x005F_x000D_ You want to add a page to your ASP.NET application to display inventory data from FactoryDB. You use a SqlConnection object to connect to the database. You need to create a connection string to FactoryDB in the instance of SQL Server named Factory on XYZ01. Which string should you use? | 
                            
| A. | ?Server=XYZ01;Data Source=Factory; Initial Catalog=FactoryDB;Integrated Security=SSPI? | 
| B. | ?Server=XYZ01;Data Source=Factory; Database=FactoryDB;Integrated Security=SSP1? | 
| C. | ?Data Source=XYZ01\Factory; Initial Category=Factory; Integrated Security=SSP1? | 
| D. | ?Data Source=XYZ01\Factory; Database=FactoryDB; Integrated Security=SSP1? | 
| Answer» E. | |
| 15. | 
                                    You are a member of a team of developers creating several ASP.NET applications for XYZ. You want to create a reusable toolbar that will be used in each of the applications. The toolbar will be displayed at the top of each page viewed by the user._x005F_x000D_ The contents of the toolbar will vary depending on options each user selects when creating a profile._x005F_x000D_ You want to be able to add the toolbar to the ASP.NET toolbox for each of the developers on your team.What should you do? | 
                            
| A. | Create a new Web Control Library project. Create the toolbar within a Web custom control. | 
| B. | Add a new Web user control to your ASP.NET project. Create the toolbar within the Web user control. | 
| C. | Add a new Web Form to your ASP.NET project. Design the toolbar within the Web Form and save the Web Form with an .ascx extension. | 
| D. | Add a new component class to your ASP.NET project. Design the toolbar within the designer of the component class. | 
| Answer» B. Add a new Web user control to your ASP.NET project. Create the toolbar within the Web user control. | |