PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

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 are creating a Windows Forms application by using the .NET Framework 3.5. You
create a new form in your application. You add a PrintDocument control named pntDoc to
the form.To support the print functionality, you write the following code segment in the
application. (Line numbers are included for reference only.)
01 pntDoc.BeginPrint += new PrintEventHandler(PrintDoc_BeginPrint);
02 …
03 bool canPrint = CheckPrintAccessControl();
04 if (!canPrint) {
05
06 }
07
You need to ensure that the following requirements are met:
When the user has no print access, font and file stream initializations are not
executed and the print operation is cancelled.
Print operations are logged whether or not the user has print access.
What should you do?

What should you do?

You create a Windows Forms application by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5. The application is installed on several computers on the network. All unhandled and unexpected exceptions must be logged to a central location to allow reporting for administrator users. You need to record the exception details. What should you do?

Which method should you use?

You are creating an ASP.NET application by using the .NET Framework 3.5.
You create an AJAX Web form in the application.
You create an ASP.NET AJAX client-component class in the Web form.
The class will be used in a JavaScript function in the Web form.
You plan to debug the JavaScript function.
You need to display all the fields of the AJAX client-component object in the trace console in the Web form by using the minimum amount of code.

Which method should you use?

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?

Which code fragment should you add?

You are creating a Windows Communication Foundation service by using Microsoft .NET Framework 3.5. You write the following code segment.

namespace MyServices
{
[ServiceContract()]
interface IManageOrders
{

}
}
The service metadata must be exposed at the relative address named meta.

You need to add an endpoint element to the app.config file of the service host. Which code fragment should you add?