PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

What should you do?

You create a master page named Template.master. Template.master contains the following ContentPlaceHolder server controls.

<asp:contentplaceholder id=”area1″ runat=”server”/>
<asp:contentplaceholder id=”area2″ runat=”server”/>

You also create 10 Web Forms. The Web Forms reference Template.master as their master page. Each Web Form has the following Content controls that correspond to the ContentPlaceHolder controls in Template.master.

<asp:Content ContentPlaceHolderID=”area1″ Runat=”Server”/> <asp:Content ContentPlaceHolderID=”area2″ Runat=”Server”/>

You need to configure the Web pages so that default content will be shown in the area2 ContentPlaceHolder control whenever a Web Form does not provide that content. What should you do?

Which code segment should you use?

You are creating a Windows Forms application that includes the database
helper methods UpdateOrder and UpdateAccount. Each method wraps code that connects to a Microsoft SQL Server 2005 database, executes a Transact-SQL statement, and then disconnects from the database. You must ensure that changes to the database that result from the UpdateAccount method are committed only if the UpdateOrder method succeeds. You need to execute the UpdateAccount method and the UpdateOrder method.
Which code segment should you use?

Which technology should you use?

You are an enterprise application developer. You are creating a client/server application. You need to install the application on the company network. The client/server application must meet the following criteria:

The server component is a class library that is created by using the .NET Framework. The client component is a Microsoft Windows-based application that is created by using the .NET Framework.
The client component and the server component must communicate by using a binary protocol.
The fewest possible ports are opened between the client component and the server component.

You need to identify a technology that permits the server to communicate with the client component through the TCP/IP protocol. Which technology should you use?

Which code segment should you use?

A Windows Forms application contains the following code segment.

string SQL = @”SELECT OrderID, ProductID, UnitPrice, Quantity FROM [Order Details]”;
SqlDataAdapter da = new SqlDataAdapter(SQL, connStr);
DataTable dt = new DataTable();
da.Fill(dt);

You need to add a new column to the data table named ItemSubtotal. The ItemSubtotal column must contain the value of the UnitPrice column multiplied by the value of the Quantity column.
Which code segment should you use?

What should you conclude?

You are an enterprise application developer. You are evaluating the physical design of a Web- based application. Fifty customers will use the application from different regions. The use of the application will trigger events of different severities. These events must be logged, extracted, and then filtered on the basis of customer, region, or severity of events. The event details also must be persisted, backed up, and archived for later retrieval. The development team plans to use an event log for logging events. On evaluation, you find the plan does not meet the requirements. You need to explain why an event log fails to meet the requirements. What should you conclude?

What should you do?

You create Web-based client applications. You are creating a Web control that includes data entry fields. The Web control also includes data validation code. The data validation code verifies whether the user has entered a valid date and a valid postal code in a text box. You are writing the code within the Web control to handle the invalid data. The Web control must work on as many browsers as possible. You need to design an appropriate feedback technique. What should you do?

<?xml version="1.0"?

A Windows Forms application reads the following XML file.

<?xml version=”1.0″?>
<x:catalog xmlns:x=”urn:books”>
<book id=”bk101″>
<author>Gambardella, Matthew</author>
<title>XML Developer’s Guide</title>
</book>
<book id=”bk102″>
<author>Ralls, Kim</author>
<title>Midnight Rain</title>
</book>
</x:catalog>

The form initialization loads this file into an XmlDocument object named docBooks. You need to populate a ListBox control named lstBooks with the concatenated book ID and title of each book.
Which code segment should you use?

Which statement should influence your decision?

You are an enterprise application developer. You are creating an application that will track shipments. This application must support integration with applications that run on different platforms and operating systems. The application that you are creating can be invoked only through SOAP messages over HTTP. You choose Web services instead of .NET Remoting to meet these requirements. You need to specify the reason for choosing Web services. Which statement should influence your decision?