[Real] 70-515 Microsoft exam cram 31-45 (Mar 2016)

Exam Code: 70-515 (Practice Exam Latest Test Questions VCE PDF)
Exam Name: TS: Web Applications Development with Microsoft .NET Framework 4
Certification Provider: Microsoft
Free Today! Guaranteed Training- Pass 70-515 Exam.

2016 Mar 70-515 Study Guide Questions:

Q31. 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? 

A. $("#ref").filter("a[href]").bold(); 

B. $("ref").filter("a").css("bold"); 

C. $("a").css({fontWeight:"bold"}); 

D. $("#ref a[href]").css({fontWeight:"bold"}); 

Answer: D 


Q32. You work as an ASP.NET Web Application Developer for SomeCompany. 

The company uses Visual Studio .NET 2010 as its application development platform. 

You are creating an ASP.NET Web application using .NET Framework 4.0. 

The Web application comprises a class named Employee with properties named as First Name, Last Name, and Age. 

You add a Web page in which you get a list of Employee objects and display those objects in a GridView control. 

You are required to add code so that the GridView row is highlighted in red color if the age of the employee is less than 21 years. 

What will you do to accomplish this? 

A. Use the RowCommand event of the GridView control. 

B. Use the SelectedlndexChanged event of the GridView control. 

C. Use the RowDataBound event of the GridView control. 

D. Use the RowEditing event of the GridView control. 

E. Use the RowUpdated event of the GridView control. 

Answer: C 


Q33. You are developing a WCF service. 

The service includes an operation names GetProduct. 

You need to ensure that GetProduct will accept a POST request and will indicate that the returned data is XML. Which two actions should you perform (Choose 2) 

A. Add the WebGet attribute to the service contract. 

B. Set WebOperationContext.Current.OutgoingRequest.ContentType to "text/xml" in the GetProduct method. 

C. Add the WebInvoke attribute to the service contract. 

D. Set WebOperationContext.Current.OutgoingResponse.ContentType to "text/xml" in the GetProduct method. 

Answer: CD 


Q34. You are developing an ASP.NET MVC 2 Web Application. 

You need to implement an asynchronous controller named AccountingController, and you must ensure that the export action required proper authorization. 

Which code segment should you use? 

A. 

public class AccountingController : Controller 

public void ExportAsync() {...} 

[Authorise] 

public void ExportCompleted() {...} 


B. 

public class AccountingController : AsyncController 

[Authorise] 

public void ExportAsync() {...} 

public void ExportCompleted() {...} 


C. 

public class AccountingController : AsyncController { [Authorise] public void Export() {...} } 

D. 

public class AccountingController : Controller 

[Authorise] 

public void ExportAsync() {...} 

[Authorise] 

public void ExportCompleted() {...} 


Answer: B 


Q35. You are implementing an ASP.NET Web site. The site contains the following class. 

public class Address 

public int AddressType; 

public string Line1; 

public string Line2; 

public string City; 

public string ZipPostalCode; 

The Web site interacts with an external data service that requires Address instances to be 


given in the following XML format. 

<Address AddressType="2"> 

<Line1>250 Race Court</Line1> 


<City>Chicago</City> 

<PostalCode>60603</PostalCode> 

</Address> 

You need to ensure that Address instances that are serialized by the XmlSerializer class meet the XML format requirements of the external data service. 

Which two actions should you perform (Each correct answer presents part of the solution. Choose two.) 

A. Add the following attribute to the AddressType field. [XmlAttribute] 

B. Add the following attribute to the Line2 field. [XmlElement(IsNullable=true)] 

C. Add the following attribute to the ZipPostalCode field. [XmlAttribute("ZipCode")] 

D. Add the following attribute to the ZipPostalCode field. [XmlElement("ZipCode")] 

Answer: AD 


70-515 book

Up to date 70-515 free exam questions:

Q36. You are implementing an ASP.NET MVC 2 Web application. You create a shared user control named MenuBar.ascx that contains the application# s menu. You need to use the menu bar in all application views. 

What should you do? 

A. In the site# s master page, create a div element with an ID of Navigation. 

Add the following code segment inside this div element. 

<% Html.RenderPartial ("~/Views/Shared/MenuBar.ascx"); %> 


B. In the site# s master page, create a div element with an ID of Navigation. 

Add the following code segment inside this div element. 

<%= Url.Content ( "~/Views/Shared/ MenuBar.ascx ") %> 


C. In each of the controller# s action methods, add an entry to the ViewData collection with 

a key of Navigation and a value of ~/Views/Shared/MenuBar.ascx. 


D. In the site# s Global.asax.cs file, register a route named Navigation that points to the 

~/Views/Shared/MenuBar.ascx file. 


Answer: A 


Q37. You are developing an ASP.NET MVC 2 application. 

You create a login user control named login.ascx. 

You need to display Login.ascx in a view. 

What should you do? 

A. Use an HTML server-side include. 

B. Use the HTML.Display method 

C. Use the HTML.Partial method. 

D. Use the @Import directive 

Answer: C 


Q38. You create an ASP.NET page named TestPage.aspx that contains validation controls. You need to verify that all input values submitted by the user have been validated by testing the Page.IsValid property. Which page event should you add an event handler to? 

A. Init 

B. Load 

C. PreInit 

D. PreLoad 

Answer: B 


Q39. You are implementing a new Dynamic Data Web site. 

The Web site includes a Web page that has an ObjectDataSource control named ObjectDataSource1. 

ObjectDataSource1 interacts with a Web service that exposes methods for listing and editing instances of a cla named Product. 

You add a GridView control named GridView1 to the page, and you specify that GridView1 should use ObjectDataSource1 as its data source. 

You then configure GridView1 to auto-generate fields and to enable editing. You need to add Dynamic Data behavior to GridView1. You also must ensure that users can use GridView1 to update Product instances. 

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) 

A. Add a DynamicDataManager control to the Web page. 


B. Disable the auto-generated fields on GridView1. Add a DynamicField control for each 

field of the Product class. 


C. Add the following code segment to the Application_Start method in the Global.asax.cs 

file. 

DefaultModel.RegisterContext( 

typeof(System.Web.UI.WebControls.ObjectDataSource), 

new ContextConfiguration() {ScaffoldAllTables = true}); 


D. Add the following code segment to the Page_Init method of the Web page. GridView1.EnableDynamicData(typeof(Product)); 


Answer: BD 


Q40. You are implementing an ASP.NET page that will retrieve large sets of data from a data source. You add a ListView control and a DataPager control to the page. You need to ensure that the data can be viewed one page at a time. What should you do? 

A. Set the DataPager control's PageSize property to the number of rows to view at one time. 

B. Set the DataPager control's PagedControlID property to the ID of the ListView control. 

C. In the codebehind file, set the DataPager control's Parent property to the ListView control. 

D. In the codebehind file, set the ListView control's Parent property to the DataPager control. 

Answer: B 


70-515 exam guide

Validated 70-515 free practice test:

Q41. 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? 

A. Add the following options to each $.ajax function call: 

global: true, 

error: function (XMLHttpRequest, textStatus, errorThrown){ $("#errorInfo").text 

("<li>Error information is: " + textStatus + "</li>"); 


B. Add the following code to the $(document).ready function on the page: 

$("#errorInfo").ajaxError(function(event, request, settings){ $(this).append 

("<li>Error requesting page " + settings.url + "</li>"); }); 


C. Add the following option to each $.ajax function call: 

error: function (XMLHttpRequest, textStatus, errorThrown){ $("#errorInfo").text 

("<li>Error information is: " + textStatus + "</li>"); 


D. Add the following code to the $(document).ready function on the page: 

$.ajaxError(function(event, request, settings){ 

$(this).append("<li>Error requesting page " + settings.url + "</li>");}); 

Add the following option to each $.ajax function call: 

global: true 


Answer: B 


Q42. You are developing an ASP.NET web application that you will deploy to an Internet Information Services (IIS) 7.0 server. 

The application will run in Integrated pipeline mode. 

The application contains a photo gallery of images that are stored in a Microsoft SQL Server database. 

You need to ensure that the application can retrieve images from the database without blocking IIS worker process threads. 

What should you do? 

A. create a synchronous HttpHandler that is registered in the HttpHandler section in the web config file 

B. asynchronous HttpHandler that is registered in the <handlers> section under system.webserver in the web.config file 

C. Create a custom HttpModule that is registered in the <httpModules> section in the web.config file 

D. Create an asynchronous HttpHandler that is registered in the <HttpHandlers> section in the web.config file 

Answer: B 


Q43. You are developing an ASP.NET web page. 

You need to ensure that content flows from right to left. 

What should you do? 

A. In the @Page directive, add an attribute named dir with a value of “RightToLeft” 

B. In the @Page directive, add an attribute named dir with a value of “RTL” 

C. In the <html> tag, add an attribute named dir with a value of “RTL” 

D. In the <html> tag, add an attribute named dir with a value of “RightToLeft” 

Answer: C 


Q44. 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.) 

A. In your site's master page, add a call to Sys.loader.defineScripts to define each of the scripts that are used in the site. 

B. In your site's master page, add a call to Sys.loader.registerScript to define each of the scripts that are used in the site. 

C. In each page that users scripts, add a call to Sys.get for each script that is needed in that page. 

D. In each page that users scripts, add a call to Sys.require for each script that is needed in that page. 

Answer: AD 


Q45. You use the ASP.NET Web Application template to create an application in a new Visual Studio solution. The project uses types that are defined in a class library project. Source code for the class library is frequently modified. You need to ensure that classes in the Web application project always reference the most recent version of the class library types. What should you do? 

A. Add the class library project to the solution. Modify the class library project to add a reference to the Web application project. 

B. Add the class library project to the solution. Modify the Web application project to add a reference to the class library project. 

C. Add a post-build step to the Web application project that copies the most recent version of the class library assembly to the bin folder of the Web application. 

D. Add a post-build step to the class library project that copies the most recent version of the class library assembly to the App_Code folder of the Web application. In the <compilation /> section of the web.config file, add an <assembly /> entry that specifies the location of the class library assembly. 

Answer: B