PrepAway - Latest Free Exam Questions & Answers

Category: 70-562

Exam 70-562: TS: Microsoft .NET Framework 3.5, ASP.NET Application Development

Which code fragment should you add to the Web.config file?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You plan to deploy the application to a test server.
You need to ensure that during the initial request to the application, the code-behind files for the Web pages are compiled. You also need to optimize the performance of the application.
Which code fragment should you add to the Web.config file?

Which section should you add to the Web.config file?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
The application contains two HTML pages named ErrorPage.htm and PageNotFound.htm.
You need to ensure that the following requirements are met:
When the userrequests a page that does not exist, the PageNotFound.htm page is displayed.
When any other error occurs, the ErrorPage.htm page is displayed.
Which section should you add to the Web.config file?

Which code fragment should you insert at line 04?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
The application contains a DataSourceControl named CategoriesDataSource that is bound to a Microsoft SQL Server 2005 table. The CategoryName column is the primary key of the table.
You write the following code fragment in a FormView control. (Line numbers are included for reference only.)
01 <tr>
02 <td align="right"><b>Category:</b></td>
03 <td><asp:DropDownList ID="InsertCategoryDropDownList"
04
05 DataSourceID="CategoriesDataSource"
06 DataTextField="CategoryName"
07 DataValueField="CategoryID"
08 RunAt="Server" />
09 </td>
10 </tr>
You need to ensure that the changes made to the CategoryID field can be written to the database.
Which code fragment should you insert at line 04?

Which code fragment should you use?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a FormView control to access the results of a query.
The query contains the following fields:
EmployeID
FirstNam
LastNam
The user must be able to view and update the FirstName field.
You need to define the control definition for the FirstName field in the FormView control.
Which code fragment should you use?

Which code segment should you insert at line 06?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a file named movies.xml that contains the following code fragment.
<Movies>
<Movie ID="1" Name="Movie1" Year="2006">
<Desc Value="Movie desc"/>
</Movie>
<Movie ID="2" Name="Movie2" Year="2007">
<Desc Value="Movie desc"/>
</Movie>
<Movie ID="3" Name="Movie3" Year="2008">
<Desc Value="Movie desc"/>
</Movie>
</Movies>
You add a Web form to the application.
You write the following code segment in the Web form. (Line numbers are included for reference only.)
01 <form runat="server">
02 <asp:xmldatasource
03 id="XmlDataSource1"
04 runat="server"
05 datafile="movies.xml" />
06
07 </form>
You need to implement the XmlDataSource control to display the XML data in a TreeView control.
Which code segment should you insert at line 06?

Which code fragment should you use?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application consumes an ASMX Web service.
The Web service is hosted at the following URL.
http://www.contoso.com/TemperatureService/Convert.asmx You need to ensure that the client computers can communicate with the service as part of the <system.serviceModel> configuration.
Which code fragment should you use?

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?


Page 4 of 8« First...23456...Last »