Microsoft 70-431 Real Exam Questions
TS: Microsoft .NET Framework 2.0 – Windows-Based Client Development
When the exam begins, you can choose the programming language in which the code segments will appear. The available code languages for this exam are:
-
Microsoft Visual Basic 2005
-
Microsoft Visual C# 2005
-
Microsoft Visual C++ 2005
1: You are creating a Windows Forms application that implements a master/detail form by using two DataGridView controls. You populate a dataset with a master table and a details table. You set the DataSource property of the master DataGridView control to the dataset. You set the DataMember property to the name of the master table. You also set the DataSource property of the details DataGridView control to the dataset. You need to ensure that the details DataGridView control displays only the child rows of the selected master row. What should you do?
A.Add a foreign key constraint to the dataset.Set the DataMember property of the child DataGridView control to the name of the foreign key constraint.
B.Define a data relation between the master table and details table in the dataset.Set the DataMember property of the child DataGridView to the name of the data relation.
C.Add a foreign key constraint to the dataset.Set the DataMember property of the child DataGridView control to the name of the details table.
D.Define a data relation between the master table and details table in the dataset.Bind the details DataGridView control to the dataset.Set the DataMember property of the child DataGridView control to the name of the details table.
Correct Answers: B
2: You are creating a Windows Forms application. The application executes a stored procedure that takes several seconds to complete. The stored procedure is invoked to populate a SqlDataReader object. You need to ensure that the application remains responsive to the user while the stored procedure is executing. What should you do?
A.Use the SqlCommand.BeginExecuteReader method to call the stored procedure.Retrieve results by using the EndExecuteReader method.
B.Use the SqlCommand.ExecuteReader method.Set the behavior parameter of this method to CommandBehavior.SequentialAccess.
C.Create and bind a SqlDependency object to a SqlCommand object. Call the SqlCommand.ExecuteReader method.Associate an OnChanged event handler with the SqlDependency object. Gather results in the OnChanged event handler method.
D.Set the Notification property of a SqlCommand object to a SqlNotificationRequest object. Call the SqlCommand.ExecuteReader method.Gather results on a background thread.
Correct Answers: A
3: A Windows Forms application loads an XmlDocument from a file named books.xml. You need to validate the XML against a schema that is contained in the books.xsd file when the XML loads. What should you do?
A.Associate the schema file with an XmlReader.Load the XmlDocument by using the XmlReader.
B.Add the schema to the Schemas property of the XmlDocument.Call the Load method of the XmlDocument by setting the filename parameter to books.xsd.
C.Call the Load method of the XmlDocument by setting the filename parameter to books.xsd, and then call the Load method by setting the filename parameter to books.xml.
D.Call the Load method of the XmlDocument by setting the filename parameter to books.xsd.Programmatically add the attribute xsi:schemaLocation to the root node. Set the value of this attribute to books.xsd.
Correct Answers: A
4: You are creating a Windows Forms application to retrieve and modify data. Depending on the installation, the data source can be a Microsoft Access database or a Microsoft SQL Server 2000 or later database. You need to ensure that your application accesses data by automatically using the data provider that is optimized for the data source. What should you do?
A.Use the ODBC data provider classes.
B.Use the OLE DB data provider classes.
C.Use the SQL Server data provider classes.
D.Use the DbProviderFactory class and related classes.
Correct Answers: D
5: You are creating a Windows Forms setup application. The default user interface does not meet your needs. You want to provide an additional dialog box that includes two check boxes during the install process. You want the check boxes to give users the option to install two large Help files named Help1 and Help2 during the installation process. You need to customize the interface to meet your needs. Which three actions should you perform? (Each correct answer presents part of the solution. Choose three.)
A.Create the dialog box and the logic for the dialog box in a separate project.Compile the project into an executable, and add the executable to the setup project.
B.In the User Interface Editor, add a Checkboxes dialog box to the Start node of the user interface tree.
C.Use the Custom Actions Editor to add the dialog box executable for the setup application to the Install node.
D.In the Properties window for your setup project, set the PreBuildEvent property to call a command line to display the dialog box.
E.In the File System Editor, set the Condition property for Help1 to the value of the Checkbox1Property property.Set the Condition property for Help2 to the value of the Checkbox2Property property.
F.Set the Checkbox3Visible and Checkbox4Visible properties of the Checkboxes dialog box to False.
Correct Answers: B E F
6: You are creating a setup project. You want to add functionality that will execute only if the setup project is executed by an administrative user. You need to configure features of your installation package to execute only when the installation is run by an administrative user. Which setup project editor supports this functionality by default?
A.File System Editor
B.Registry Editor
C.User Interface Editor
D.Custom Actions Editor
Correct Answers: C
7: You are testing an installation package for a Windows Forms application. You notice that the installed application will not run on client computers that do not have the .NET Framework installed. You need to ensure that when a user installs the application on his or her client computer, the .NET Framework is also installed. What should you do?
A.Select the .NET Framework in the Dependencies property value in the project’s property grid.
B.Verify that the .NET Framework redistributable package check box is selected under the Prerequisites button on the Setup property pages.
C.Add the .NET Framework redistributable package to the setup project in the File System Editor.
D.Create a Custom Actions Editor that copies the .NET Framework redistributable package to the applications root directory.
Correct Answers: B
8: You create a Windows-based application that requires the use of a COM component. You need to create a ClickOnce deployment package to distribute the application from an Internet Web site. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A.Set the Isolated property of the COM component references in the application project to False.
B.Set the Isolated property of the COM component references in the application project to True.
C.Verify that the user is using Microsoft Windows XP.
D.Verify that the user is using Microsoft Windows 2000.
E.Assign RegistryPermission to the application.
Correct Answers: B C
9: You are creating a Windows Forms application that targets Microsoft Windows 2000 or later. You need to configure your Setup application for conditional installation. Which part or parts of a Setup application can be configured for conditional installation based on the operating system? (Choose all that apply.)
A.primary output of a project
B.registry keys and values
C.file type associations
D.user interface dialog boxes
E.custom actions
Correct Answers: B C
10: You are configuring a ClickOnce deployment that allows users to install your application from the Internet zone under partial trust permissions. You want the application to access data that resides on the same remote server from which the application is installed. You need to add one or more types of data access that are allowed under partial trust permissions to your application. Which type or types of data access are allowed? (Choose all that apply.)
A.data access through HTTP with System.Net.WebClient
B.data access through XML Web services
C.data access through System.Data.SqlClient
D.data access through HTTP with System.Net.HttpWebRequest
Correct Answers: A B D
Download | Password: certificatexam.com
Nice work. You keep working on this blog please.
Good job! what a great post!