PrepAway - Latest Free Exam Questions & Answers

Category: 70-568

Exam 70-568: UPGRADE: Transition your MCPD Enterprise Application Developer Skills to MCPD Enterprise Application Developer 3.5, Part 1

Which line of code should you insert at line 08?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft
ADO.NET.You write the following code segment. (Line numbers are included for reference
only.)
01 DataTable dt = new DataTable();
02 dt.Columns.Add(“number”);
03 dt.Columns.Add(“string”);
04 dt.Rows.Add(1, “3”);
05 dt.Rows.Add(2, “2”);
06 dt.Rows.Add(3, “1”);
07 var result = from p in dt.AsEnumerable()
08
09 foreach (var number in result) {
10 Console.Write(number.ToString());
11 }
You need to display the string “321”.Which line of code should you insert at line 08?

Which code segment should you use?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5. The application consumes a Microsoft Windows Communication Foundation
(WCF) service.The WCF service exposes the following method.
[WebInvoke]
string UpdateCustomerDetails(string custID);
The application hosts the WCF service by using the following code segment.
WebServiceHost host = new WebServiceHost(typeof(CService), new Uri(“http://win/”));
ServiceEndpoint ep = host.AddServiceEndpoint(typeof(ICService), new WebHttpBinding(),
“”);
You need to invoke the UpdateCustomerDetails method. Which code segment should you use?

Which code segment should you add at line 06?

You are creating a Windows Forms application by using the .NET Framework 3.5. You write
the following code segment to bind a list of categories to a drop-down list.(Line numbers are
included for reference only.)
01 OleDbConnection cnnNorthwind = new OleDbConnection(connectionString);
02 OleDbCommand cmdCategory = new OleDbCommand( “SELECT CategoryID,
CategoryName FROM Categories ORDER BY CategoryName”, cnnNorthwind);
03 OleDbDataAdapter daCategory = new OleDbDataAdapter(cmdCategory);
04 DataSet dsCategory = new DataSet();
05 daCategory.Fill(dsCategory);
06
You need to ensure that the drop-down list meets the following requirements:
Displays all category names.
Uses the category ID as the selected item value.
Which code segment should you add at line 06?

What should you do?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft
ADO.NET. The application uses a Microsoft SQL Server 2005 database. To open a
connection to the database, you write the following code segment. (Line numbers are
included
for reference only.)
01 private void GetOpenOrders() {
02 try {
03 //open SqlConnection and execute command.
04 }
05 catch (SqlException exp) {
06
07 }
08 }
The connection generates error messages and raises an exception. You use a ListBox control
named lstResults to display the error messages.You need to add a list item in the lstResults
control for each connection-related error message returned by the SqlConnection object.
What should you do?

What should you do?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5.You add a Web page named HomePage.aspx in the application. The Web page
contains different controls.You add a newly created custom control named CachedControl to
the Web page. You need to ensure that the following requirements are met:
The custom control state remains static for one minute.
The custom control settings do not affect the cache settings of other elements in the Web page.
What should you do?

What should you do?

You create Windows Forms applications by using the .NET Framework 3.5. You create a
new application for Windows Vista client computers. The application requires elevated
access to read files from the local file system.
You need to ensure that the application requires
elevated permissions on execution. What should you do?

What should you do?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework
version 3.5.The application must redirect the original URL to a different ASPX page.
You need to ensure that the users cannot view the original URL after the page is executed.
You also need to ensure that each page execution requires only one request from the client
browser. What should you do?

What should you do?

You create Windows Forms applications by using the .NET Framework 3.5. You plan to use
the Windows Installer to deploy a new application.The application must meet the following
requirements:
Support deployment to 32-bit and 64-bit operating systems.
Use the 64-bit Program Files folder when deployed to 64-bit platforms.
You need to ensure that the application is deployed appropriately.What should you do?

What should you do?

You create Windows Forms applications by using the .NET Framework 3.5. You plan to
deploy a new application.You need to ensure that on deployment, the application meets the
following requirements:
It is executed on the client computer.
It is removed from the client computer after the application is closed.
It is not displayed in the Add/Remove programs panel on the client computer.
What should you do?


Page 3 of 1212345...10...Last »