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 resolve the error so that the new view is displayed when the Index method is invoked

You create an ASP.NET MVC 2 Web application that contains the following controller class.
public class ProductController : Controller
{
static List<Product> products = new List<Product>();
public ActionResult Index()
{
return View();
}}
In the Views folder of your application, you add a view page named Index.aspx that includes the
following @ Page directive.
<%@ Page Inherits=”System.Web.Mvc.ViewPage” %>

You test the application with a browser. You receive the following error message when the Index
method is invoked: “The view ‘Index’ or its master was not found.” You need to resolve the error so
that the new view is displayed when the Index method is invoked. What should you do?

Which attribute should you add to the OutputCache directive?

You are developing an ASP.NET Web application. The application will contain a page that is
customized for various browsers. The application will use output caching to optimize performance.
You need to ensure that the page is cached by browser type and major version only. Which attribute
should you add to the OutputCache directive?

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 a method in an ASP.NET application that includes the following requirements.
Store the number of active bugs in the cache. The value should remain in the cache when there are
calls more often than every 15 seconds. The value should be removed from the cache after 60
seconds. You need to add code to meet the requirements. Which code segment should you add?

Which attribute should you use?

You are implementing an ASP.NET application that will use session state in out-of-proc mode.
You add the following code.
Public Class Person
Public Property FirstName As String
Public Property LastName As String
End Class
You need to add an attribute to the Person class to ensure that you can save an instance to session
state. Which attribute should you use?

You need to ensure that the JavaScript for each of these controls that is used in an ASP.NET page…

You are implementing custom ASP.NET server controls. You have a base class named
RotaryGaugeControl and two subclasses named CompassGaugeControl and SpeedGaugeControl.
Each control requires its own client JavaScript code in order to function properly. The JavaScript
includes functions that are used to create the proper HTML elements for the control. You need to
ensure that the JavaScript for each of these controls that is used in an ASP.NET page is included in
the generated HTML page only once, even if the ASP.NET page uses multiple instances of the given
control. What should you do?


Page 14 of 26« First...1213141516...20...Last »