70-515 testing software(181 to 195) for examinee: Mar 2016 Edition

★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions

Free Instant Download NEW 70-515 Exam Dumps (PDF & VCE):
Available on: https://www.certleader.com/70-515-dumps.html


70-515 Product Description:
Exam Number/Code: 70-515 vce
Exam name: TS: Web Applications Development with Microsoft .NET Framework 4
n questions with full explanations
Certification: Microsoft Certification
Last updated on Global synchronizing

Instant Access to Free VCE Files: Microsoft 70-515 TS: Web Applications Development with Microsoft .NET Framework 4

70-515 examcollection

Question No. 181

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? 

A. Add the following markup to the default.skin file. 

<asp:Button ID="Help"></asp:Button> 

<asp:Button ID="Default"></asp:Button> 

Use the following markup for the buttons in the ASP.NET page. 

<asp:Button SkinID="Help">Help</asp:Button> 

<asp:Button SkinID="Default">Detail</asp:Button> 


B. Add the following markup to the default.skin file. 

<asp:Button SkinID="Help"></asp:Button> 

<asp:Button ID="Default"></asp:Button> 

Use the following markup for the buttons in the ASP.NET page. 

<asp:Button SkinID="Help">Help</asp:Button> 

<asp:Button SkinID="Default">Detail</asp:Button> 


C. Add the following code segment to default.skin. 

<asp:Button SkinID="Help"></asp:Button> 

<asp:Button></asp:Button> 

Use the following markup for the buttons in the ASP.NET page. 

<asp:Button SkinID="Help"></asp:Button> 

<asp:Button SkinID="Default">Detail</asp:Button> 


D. Add the following markup to default.skin. 

<asp:Button SkinID="Help"></asp:Button> 

<asp:Button></asp:Button> 

Use the following markup for the buttons in the ASP.NET page. 

<asp:Button SkinID="Help">Help</asp:Button> 

<asp:Button>Detail</asp:Button> 


Answer:


Question No. 182

You create a Visual Studio 2010 solution that includes a WCF service project and an ASP.NET project. The service includes a method named GetPeople that takes no arguments and returns an array of Person objects. The ASP.NET application uses a proxy class to access the service. You use the Add Service Reference wizard to generate the class. After you create the proxy, you move the service endpoint to a different port. You need to configure the client to use the new service address. In addition, you must change the implementation so that calls to the client proxy will return a List<Person> instead of an array. 

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

A. In the context menu for the service reference in the ASP.NET project, select the Configure Service Reference command, and set the collection type to System.Collections.Generic.List. 

B. In the context menu for the service reference in the ASP.NET project, select the Update Service Reference command to retrieve the new service configuration. 

C. Change the service interface and implementation to return a List<Person>. 

D. Edit the address property of the endpoint element in the web.config file to use the new service address. 

Answer: AD 


Question No. 183

You are developing an ASP.NET web page. The page includes functionality to make a web request and to display the responde in a specified HTML element. 

You need to add a client-side function to write the response to the specified HTML element.Which function should you add? 

A. function loadData(url,element){ 

$(element).ajaxStart(function(){ 

$(this).text(url); 

}); 


B. function loadData(url,element){ 

$(element).ajaxSend(function(){ 

$(this).text(url); 

}); 


C. function loadData(url,element){ 

$.post(element,function(url){ 

$(element).text(url); 

}); 


D. function loadData(url,element){ 


$.get(url,function(data){ 

$(element).text(data); 

}); 


Answer:


Question No. 184

State management 

You have to store user data of 200 KB in an object. 

Which state management technique to use: 

A. Server session 

B. Cookie 

C. ViewState 

D. Hidden Field 

Answer:


Question No. 185

You deploy an ASP.NET application to an IIS server. You need to log health-monitoring events with severity level of error to the Windows application event log. What should you do? 

A. Run the aspnet_regiis.exe command. 


B. Set the Treat warnings as errors option to All in the project properties and recompile. 


C. Add the following rule to the healthMonitoring section of the web.config file. 

<rules> 

<add name="Failures" eventName="Failure Audits" 

provider="EventLogProvider" /> 

</rules> 


D. Add the following rule to the healthMonitoring section of the web.config file. 

<rules> 

<add name="Errors" eventName="All Errors" provider="EventLogProvider" /> 

</rules> 


Answer:


Question No. 186

You are developing an ASP.NET Web service. The following code segment implements the service. (Line numbers are included for reference only.) 

01 [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] 02 public class ProductService : 

System.Web.Services.WebService 03 { 04 [WebMethod] 05 public Product GetProduct(string name) 06 { 

08 } 

09 

10 [WebMethod] 

11 public Product GetProduct(int id) 

12 { 

13 

14 } 

15 } 


You need to ensure that both GetProduct methods can be called from a Web client. 


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

A. Remove line 01. 

B. Add the static modifier on lines 05 and 11. 

C. Add the following attribute before line 10. [SoapDocumentMethod(Action="GetProductById")] 

D. Modify the attribute on line 10 as follows. [WebMethod(MessageName="GetProductById")] 

Answer: AD 


Question No. 187

You are developing an ASP.NET Web page that will display the median value from a sequence of integer values. You need to create an extension method to compute the median value. 

Which interface should you add the extension method to? 

A. IComparer(Of T) 

B. IEnumerable(Of T) 

C. IEnumerator(Of T) 

D. IEqualityComparer(Of T) 

Answer:


Question No. 188

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:


Question No. 189

You are implementing an ASP.NET application that includes a page named TestPage.aspx. TestPage.aspx uses a master page named TestMaster.master. 

You add the following code to the TestPage.aspx code-behind file to read a TestMaster.master public property named CityName. 

protected void Page_Load(object sender, EventArgs e) 

string s = Master.CityName; 

You need to ensure that TestPage.aspx can access the CityName property. 

What should you do? 

A. Add the following directive to TestPage.aspx. <%@ MasterType VirtualPath="~/TestMaster.master" %> 

B. Add the following directive to TestPage.aspx. <%@ PreviousPageType VirtualPath="~/TestMaster.master" %> 

C. Set the Strict attribute in the @ Master directive of the TestMaster.master page to true. 

D. Set the Explicit attribute in the @ Master directive of the TestMaster.master page to true. 

Answer:


Question No. 190

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 


Question No. 191

You are updating an ASP.NET Web Application. 

The application includes the fallowing classes. 


public class Supervisor 

public string FirstName { get; set; } 

public string LastName { get; set; } 

public List<Employee> Employees { get; set; } 

public class Employee 

public String FirstName { get; set; } 

public String LastName { get; set; } 


An application page contains the fallowing markup. 


<asp:Repeater ID="rptSupervisor" runat="server" 

DataSourceID="odsEmployees"> 

<ItemTemplate> 

<%#Eval("FirstName") %> <%#Eval("LastName") %><br /> 

Employees:<br /> 

<asp:Repeater ID="rptEmployees" runat="server"> 


<ItemTemplate> 

<%#Eval("FirstName") %> <%#Eval("LastName") %> 

<br /> 

</ItemTemplate> 

</asp:Repeater> 

</ItemTemplate> 

</asp:Repeater> 

<asp:ObjectDataSource ID="odsEmployees" runat="server" 


SelectMethod="GetSupervisorWithEmployees" 

TypeName="BusinessLayer"> 

</asp:ObjectDataSource> 


You need to ensure that the page displays a list of supervisors with their corresponding employees. 

What should you do? 

A. Bind rptEmployees during the OnItemCommand event of rptSupervisor. 

B. Bind rptEmployees during the OnItemDataBound event of rptEmployees. 

C. Set the rptEmployees DataSourceID attribute to "Employees". 

D. Set the rptEmployees DataSource attribute to <%# Eval("Employees") %> 

Answer:


Question No. 192

You are developing an ASP.NET web page. 

The page must display data from XML file named Inventory.xml. Inventory.xml contains data in the following format. 

<?xml version="1.0" standalone="yes"?> 

<inventory> 

<vehicle Make="BMW" Model="M3" Year="2005" Price="30000" instock="Yes"> 

<Ratings>....</Ratings> 

</Vechicle> 

.... 

</Inventory> 

You need to display Vehicle elements that have the inStock attribute set to YES. 

Wich two controls should you add to the page? (Each control presents part of the solution.Choose two.) 

A. <asp:GridView ID="GridView1" runat="server" 

AutoGenerateColumns="True" 

DataSource="inventoryXMLDataSource"> 

.... 

</asp:GridView> 


B. <asp:GridView ID="GridView1" runat="server" 

AutoGenerateColumns="True" 

DataSourceID="inventoryXMLDataSource"> 

.... 

</asp:GridView> 


C. <asp:XMLDataSource ID="InventoryXMLDataSource" 

runat="server" DataFile="Inventory.xml" 

XPath="/Inventory/Car[@InStock='Yes']"> 

</asp:XMLDataSource> 


D. <asp:XMLDataSource ID="InventoryXMLDataSource" 

runat="server" DataFile="Inventory.xml" 

XPath="/Inventory/Car/InStock='Yes'"> 

<Data>Inventory.xml</Data> 

</asp:XMLDataSource> 


Answer: AC 


Question No. 193

You are implementing an ASP.NET MVC 2 Web application. A controller contains the following code. 

Function Edit(ByVal id As Integer) As ActionResult Return View(SelectUserToEdit(id)) End Function Function Edit(ByVal person As Person) As ActionResult UpdateUser(person) 

Return RedirectToAction("Index") 

End Function 

The first Edit action displays the user whose details are to be edited, and the second Edit action is called when the Save button on the editing form is clicked to update the user details. An exception is thrown at run time stating that the request for action Edit is ambiguous. 

You need to correct this error and ensure that the controller functions as expected. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.) 

A. Add the following attribute to the first Edit action. <AcceptVerbs(HttpVerbs.Head)> 

B. Add the following attribute to the first Edit action. <HttpGet()> 

C. Add the following attribute to the second Edit action. <HttpPost()> 

D. Add the following attribute to the second Edit action. <HttpPut()> 

Answer: BC 


Question No. 194

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 will be accessed by international audience. 

The Web application holds global and local resources for display elements that must be translated into the language that is preferred by the user. 

You are required to ensure that a Label control named CompanyLabel displays text in the user's preferred language from the global resource file. 

Which control markup will you use? 

A. <asp:Label lD="CompanyLabel" runat="server" Text="<%$ Resources:WebResources, Text %>" /> 

B. <asp:Label lD="CompanyLabel" runat="server" Text="<% Resources:WebResources % >" /> 

C. <asp:Label lD="CompanyLabel" runat="server" Text="<%$ Resources:WebResources, CompanyLabelText %>" /> 

D. <asp:Label lD="CompanyLabel" runat="server" Text="CompanyLabel" meta: resourcekey="CompanyLabel.Text" /> 

Answer:


Question No. 195

You are implementing an ASP.NET application. The application includes a Person class with property Age. You add a page in which you get a list of Person objects and display the objects in a GridView control. You need to add code so that the GridView row is highlighted in red if the age of the person is less than 18. Which GridView event should you handle? 

A. RowDataBound 

B. RowCommand 

C. RowUpdated 

D. RowEditing 

Answer: