PrepAway - Latest Free Exam Questions & Answers

Author: admin

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 Web form by using ASP.NET AJAX.
The Web form contains the following code fragment. (Line numbers are included for reference only.)

01 <script type="text/javascript">
02
03 Sys.Application.add_init(initComponents);
04
05 function initComponents() {
06
07 }
08
09 </script>
10
11 <asp:ScriptManager ID="ScriptManager1"
12 runat="server" />
13 <asp:TextBox runat="server" ID="TextBox1" />

You need to create and initialize a client behavior named MyCustomBehavior by using the initComponents function. You also need to ensure that MyCustomBehavior is attached to the TextBox1 Textbox control.
Which code segment should you insert at line 06?

Which code fragment should you insert at line 11?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You add the following code fragment to the Web.config file of the application (Line numbers are included for reference only).
01 <healthMonitoring>
02 <providers>
03 <add name="EventLogProvider"
04 type="System.Web.Management.EventLogWebEventProvider
05 />
06 <add name="WmiWebEventProvider"
07 type="System.Web.Management.WmiWebEventProvider
08 />
09 </providers>
10 <eventMappings>
11
12 </eventMappings>
13 <rules>
14 <add name="Security Rule" eventName="Security Event"
15 provider="WmiWebEventProvider" />
16 <add name="AppError Rule" eventName="AppError Event"
17 provider="EventLogProvider" />
18 </rules>
19 </healthMonitoring>
You need to configure Web Events to meet the following requirements:
Security-related Web Events are mapped to Microsoft Windows Management Instrumentation (WMI) events.
Web Events caused by problems with configuration or application code are logged into the Windows Application Event Log.
Which code fragment should you insert at line 11?

What are three possible reasons that could cause this increase?

You create a Microsoft ASP.NET Web application by using the Microsoft .NET Framework version 3.5.
When you review the application performance counters, you discover that there is an unexpected increase in the value of the Application Restarts counter.
You need to identify the reasons for this increase.
What are three possible reasons that could cause this increase? (Each correct answer presents a complete solution. Choose three.)

Which code fragment should you use?

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
The application is deployed on a Microsoft IIS 6.0 Web server by using the default ASP.NET version 2.0 application pool and Windows Authentication.
The application contains functionality to upload files to a location on a different server.
Users receive an access denied error message when they attempt to submit a file.
You need to modify the Web.config file to resolve the error.
Which code fragment should you use?

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?