PrepAway - Latest Free Exam Questions & Answers

Author: seenagape

What should you do?

You create an application by using Microsoft Visual Studio 2008 and the .NET Framework 3.5.

The application is hosted on a Web server that runs Microsoft Windows Server 2003. It connects to a third-party system by using Web service calls. The third-party system experiences occasional unplanned outages. When a system outage occurs, the application must perform the following tasks:

Log error details.
Notify an on-call technician.

You need to develop a strategy to perform the required tasks. What should you do?

Which code segment should you insert at line 03?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.

The application has a Web form file named MovieReviews.aspx.

The MovieReviews.aspx file connects to a LinqDataSource DataSource named LinqDataSource1 that has a primary key named MovieID.

The application has a DetailsView control named DetailsView1.

The MovieReviews.aspx file contains the following code fragment. (Line numbers are included for reference only.)

01 <asp:DetailsView ID=”DetailsView1″ runat=”server”
02 DataSourceID=”LinqDataSource1″
03
04 />
05 <Fields>
06 <asp:BoundField DataField=”MovieID” HeaderText=”MovieID”
07 InsertVisible=”False”
08 ReadOnly=”True” SortExpression=”MovieID” />
09 <asp:BoundField DataField=”Title” HeaderText=”Title”
10 SortExpression=”Title” />
11 <asp:BoundField DataField=”Theater” HeaderText=”Theater”
12 SortExpression=”Theater” />
13 <asp:CommandField ShowDeleteButton=”false”
14 ShowEditButton=”True” ShowInsertButton=”True” />
15 </Fields>
16 </asp:DetailsView>

You need to ensure that the users can insert and update content in the DetailsView1 control.
You also need to prevent duplication of the link button controls for the Edit and New operations.

Which code segment should you insert at line 03?

Which code segment should you insert at line 07?

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 private List<string> GetEmployers() {
02 List<string> employers = new List<string>();
03 SqlCommand cmd = new SqlCommand();
04 …
05 XmlReader reader = cmd.ExecuteXmlReader();
06 while (reader.Read()) {
07
08 }
09 return employers;
10 }
The cmd object returns the following XML data structure.
<Resume>
<Name>
<Name.First>Shai</Name.First>
<Name.Last>Bassli</Name.Last>
</Name>
<Employment>
<Emp.OrgName>Wingtip Toys</Emp.OrgName>

</Employment>

</Resume>
You need to populate the employers list with each employer entry in the XML data
structure.
Which code segment should you insert at line 07?

What should you do?

You create an application by using Microsoft Visual Studio .NET 2008 andthe .NET Framework 3.5. You plan to create the presentation layer of the application. Users will access the application

on Windows Vista client computers that have the .NET Framework 3.5 installed. You need to ensure that the application meets the following requirements:

It runs in Microsoft Internet Explorer.
It provides maximum usability by using 3D graphics and animations. It does not require additional components to be installed on the client computers. What should you do?

What should you do?

You create a Microsoft ASP.NET AJAX application by using the Microsoft .NET Framework version 3.5.

You attach Microsoft Visual Studio 2008 debugger to the Microsoft Internet Explorer instance to debug the JavaScript code in the AJAX application.
You need to ensure that the application displays the details of the client-side object on the debugger console.

What should you do?

Which code segment should you use?

You create an application by using the Microsoft .NET Framework 3.5 and Microsoft
ADO.NET. The application connects to a Microsoft SQL Server 2005 database. You write
the following code segment.
string query = “Select EmpNo, EmpName from dbo.Table_1;
select Name,Age from dbo.Table_2″;
SqlCommand command = new SqlCommand(query, connection);
SqlDataReader reader = command.ExecuteReader();
You need to ensure that the application reads all the rows returned by the code
segment.Which code segment should you use?