PrepAway - Latest Free Exam Questions & Answers

Category: 70-515 (v.3)

Exam 70-515: TS: Web Applications Development with Microsoft .NET Framework 4 (update October 26th, 2015)

You need to display the items in a table named Products by using a custom layout

You are implementing an ASP.NET Dynamic Data Web site. The Web site includes a data context that
enables automatic scaffolding for all tables in the data model. The Global.asax.vb file contains the
following code segment.
Public Shared Sub RegisterRoutes(ByVal routes As RouteCollection)
routes.Add(New DynamicDataRoute(“{table}/ListDetails.aspx”) _
With
{
.Action = PageAction.List,
.ViewName = “ListDetails”,
.Model = DefaultModel
})
routes.Add(New DynamicDataRoute(“{table}/ListDetails.aspx”) _
With
{
.Action = PageAction.Details,
.ViewName = “ListDetails”,
.Model = DefaultModel
})
End Sub
You need to display the items in a table named Products by using a custom layout. What should you
do?

Which code segment should you use?

You are implementing an ASP.NET Web site. The site allows users to explicitly choose the display
language for the site# s Web pages. You create a Web page that contains a DropDownList named
ddlLanguage, as shown in the following code segment.
<asp:DropDownList ID=”ddlLanguage” runat=”server” AutoPostBack=”True”
ClientIDMode=”Static” OnSelectedIndexChanged=”SelectedLanguageChanged”>
<asp:ListItem Value=”en”>English</asp:ListItem>
<asp:ListItem Value=”es”>Spanish</asp:ListItem>
<asp:ListItem Value=”fr”>French</asp:ListItem>
<asp:ListItem Value=”de”>German</asp:ListItem>
</asp:DropDownList>
The site contains localized resources for all page content that must be translated into the language
that is selected by the user. You need to add code to ensure that the page displays content in the
selected language if the user selects a language in the drop-down list. Which code segment should
you use?

Which code segment should you add?

You are implementing an ASP.NET application that includes the following requirements. Retrieve the
number of active bugs from the cache, if the number is present. If the number is not found in the
cache, call a method named GetActiveBugs, and save the result under the ActiveBugs cache key.
Ensure that cached data expires after 30 seconds. You need to add code to fulfill the requirements.
Which code segment should you add?

Which two actions should you perform?

You create a custom server control named Task that contains the following code segment. (Line
numbers are included for reference only.)
01Namespace DevControls
03 Public Class Task
04 Inherits WebControl
06 <ComponentModel.DefaultValue(“”)>
07 Public Property Title As String
09 Protected Overrides Sub RenderContents(
10 ByVal output As HtmlTextWriter)
12 output.Write(Title)

13 End Sub
15 End Class
17 End Namespace
You need to ensure that adding a Task control from the Toolbox creates markup in the following
format.
<Dev:Task ID=”Task1″ runat=”server” Title=”New Task” />
Which two actions should you perform? (Each correct answer presents part of the solution. Choose
two.)

Which two actions should you perform?

You are implementing an ASP.NET application that makes extensive use of JavaScript libraries. Not
all pages use all scripts, and some scripts depend on other scripts. When these libraries load
sequentially, some of your pages load too slowly. You need to use the ASP.NET Ajax Library Script
Loader to load these scripts in parallel. Which two actions should you perform? (Each correct answer
presents part of the solution. Choose two.)

You need to create and use a separate style for the Help button, and you must use the default style for the De

You are implementing an ASP.NET page. You add asp:Button controls for Help and for Detail. You
add an ASP.NET skin file named default.skin to a theme. You need to create and use a separate style
for the Help button, and you must use the default style for the Detail button. What should you do?

Which code segment should you use?

A Web page includes the HTML shown in the following code segmen <span id=”ref”>
<a name=Reference>Check out</a> the FAQ on
<a href=”http://www.contoso.com”>
Contoso</a>’s web site for more information:
<a href=”http://www.contoso.com/faq”>FAQ</a>.
</span>
<a href=”http://www.contoso.com/home”>Home</a>
You need to write a JavaScript function that will dynamically format in boldface all of the hyperlinks
in the ref span. Which code segment should you use?

You need to implement a single error handler that will add error information from all page $.ajax calls to the

You create an ASP.NET page. The page uses the jQuery $.ajax function to make calls back to the
server in several places. You add the following div element to the page.
<div id=”errorInfo”>
</div>
You need to implement a single error handler that will add error information from all page $.ajax
calls to the div named errorInfo. What should you do?


Page 6 of 26« First...45678...20...Last »