15 tips on microsoft press ebook mcts 70-515

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 Apr 70-515 Study Guide Questions:

Q91. Which method of the Page class searches the page naming container for a server control with a particular identifer? 

A. FindFieldTemplate 

B. FindControl 

C. FindDataSourceControl 

D. FindDataControl 

Answer: B 


Q92. 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 


Q93. You are implementing an ASP.Net web page that includes a Treeview control. 

You need to ensure that the TreeView control nodes are populated only when they are first expanded. 

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

A. Set the PopulateNodesFromClient property of the TreeView control to true. 

B. Add an event handler to the TreeNodeDataBound event that includes code to populate the node. 

C. Set the PopulateOnDemand property of the TreeNode control to true. 

D. Add an event handler to the TreeNodePopulate event than includes code to populate the node. 

Answer: CD 


Q94. You are implementing an ASP.NET web application.The application defines the following classes. 

public class Person { public String Name{get; set;} publicIList<Address> Addresses{get;set;} } public class Address { public String AddressType{get; set;} public string AddressValue{get;set;} } 

The applicaction must generate XML from personList, wich is a collection of Person instances.The following XML is an example of the schema than the generated XML must use. 

<Persons> 

<Person Name="John Doe"> 

<Address Email="John.Doe@contoso.com"/> 

<Address AlternativeEmail="John.Doe@contoso.com"/> 


<Address MSNInstanceMessenger="John.Doe@contoso.com"/> 

</Person> 

..... 

</Persons> 

You need to generate the XML. 

Wich code segment should you use? 

A. var XML= new XElement("Persons", 

from person in personList 

Select (new XElement("Persons", 

newXElement("Name", person.Name), 

from addr in person.Addresses 

select new XElement("Address", 

newXElement(addr.AddressType, 

addr.AddressValue))))); 


B. var XML= new XAttribute("Persons", 

from person in personList 

Select (new XElement("Persons", 

newXAttribute("Name", person.Name), 

from addr in person.Addresses 

select new XAttribute("Address", 

newXAttribute(addr.AddressType, 

addr.AddressValue))))); 


C. var XML= new XElement("Persons", 

from person in personList 

Select (new XElement("Persons", 

newXAttribute("Name", person.Name)))); 


D. var XML= new XElement("Persons", 

from person in personList 

Select (new XElement("Person", 

newXAttribute("Name", person.Name), 

from addr in person.Addresses 

select new XElement("Address", 

newXAttribute(addr.AddressType, 

addr.AddressValue))))); 


Answer: D 


Q95. You are implementing a Web page that displays text that was typed by a user. You need to display the user input in the Web page so that a cross-site scripting attack will be prevented. 

What should you do? 

A. Call document.write. 

B. Call Response.Write. 

C. Call HttpUtility.UrlEncode. 

D. Call HttpUtility.HtmlEncode. 

Answer: D 


70-515 exam question

Avant-garde mcts 70-515:

Q96. Which class defines the contract that ASP.NET implements to provide membership services using custom membership providers? 

A. FormsAuthentication 

B. RoleProvider 

C. SqlRoleProvider 

D. MembershipProvider 

Answer: D 


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

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

You create an ASP.NET Web application using .NET Framework 4.0. 

You are planning to deploy the ASP.NET Web application to a production server by 

publishing the Web application in Release configuration. 

You must ensure that the connection string value in the Web.config file is updated to the 

connection string value of the production server during publishing. 

What will you do? 


A. Add the following code to the Web.config file. 

<connectionStrings> 

<add name="DataBD" connectionString="Server=ProductionSewer; 

Database=ProductionDB;Integrated Security=SSPI;" xdt:Transform="Replace" xdt: 

Locator="Match(name)" /> 

</connectionStrings> 


B. Add the following code to the Web.release.config file. 

<connectionStrings> 

<add name="DataBD" connectionString="Server=ProductionSewer; 

Database=ProductionDB;Integrated Security=SSPI;" xdt:Transform="Replace" xdt: 

Locator="Match(name)" /> 

</connectionStrings> 


C. Add the following code to the Web.config file: 

<connectionStrings> 

<add name="DataBD" connectionString="Server=ProductionSewer; 

Database=ProductionDB;Integrated Security=SSPI;" xdt:Transform="Replace" xdt: 

Locator="XPath(name)" /> 

</connectionStrings> 


D. Add the following code to the Web.release.config file. 

<connectionStrings> 

<add name="DataBD" connectionString="Server=ProductionSewer; 

Database=ProductionDB;Integrated Security=SSPI;" xdt:Transform="Replace" xdt: 

Locator="XPath(name)" /> 

</connectionStrings> 


Answer: B 


Q98. A text box should enter valid date options all were compare validators but the operator differed (equal and datatyp)..controltovalidate in two options and controltocompare in the remainin.. 

A. <asp:CompareValidator ID="CompareValidator1" runat="server" 

Operator="DataTypeCheck" 

Type="Date"></asp:CompareValidator> 


B. <asp:CompareValidator ID="CompareValidator1" runat="server" Operator="Equal" 

Type="Date"></asp: 

CompareValidator> 


C. <asp:CompareValidator ID="CompareValidator1" runat="server" Operator="LessThan" 

Type="Date"></asp: 

CompareValidator> 


D. <asp:CompareValidator ID="CompareValidator1" runat="server" 

Operator="DataTypeCheck" 

Type="Double"></asp:CompareValidator> 


Answer: A 


Q99. You use the ASP.NET Web Site template to create a Web site that will be deployed to 

multiple locations. Each location will specify its SMTP configuration settings in a separate file named smtp.config in the root folder of the Web site. 

You need to ensure that the configuration settings that are specified in the smtp.config file will be applied to the Web site. 

Which configuration should you use in web.config? 

A. <configuration> 

<system.net> 

<mailSettings> 

<smtp configSource="smtp.config" allowOverride="true"> 

<network host="127.0.0.1" port="25"/> 

</smtp> 

</mailSettings> 

</system.net> 

</configuration> 


B. <configuration> 

<system.net> 

<mailSettings> 

<smtp configSource="smtp.config" /> 

</mailSettings> 

</system.net> 

</configuration> 


C. <configuration xmlns:xdt="http://schemas.microsoft.com/XML- Document-Transform"> 

<location path="smtp.config" xdt:Transform="Replace" xdt:Locator="Match 

(path)"> 

<system.net /> 

</location> 

</configuration> 


D. <configuration> 

<location path="smtp.config"> 

<system.net> 

<mailSettings> 

<smtp Devilery Method="Network" > 

<Network Host = "127.0.0.1" Port="25"/> 

</smtp> 

</mailSettings> 

</system.net> 

</location> 

</configuration> 


Answer: B 


Q100. You are implementing an ASP.NET page that includes the following down list. 

<asp:PlaceHolder ID="dynamicControls" runat="server"> <asp:DropDownList ID="MyDropDown" runat="server"> <asp:ListItem Text="abc" value="abc" /> 

<asp:ListItem Text="def" value="def" /> 

</asp:DropDownList> 

</asp:PlaceHolder> 

You need to dynamically add values to the end of the drop-down list. 

What should you do? 

A. Add the following OnPreRender event handler to the asp:DropDownList 

Private Sub mydropdown_PreRender(ByVal sender As Object, ByVal e As System. 

EventArgs) Handles mydropdown.PreRender 

Dim ddl As DropDownList = TryCast(sender, DropDownList) 

Dim lbl As Label = New Label() 

lbl.Text = "Option" 

lbl.ID = "Option" 

ddl.Controls.Add(lbl) 

End Sub 


B. Add the following OnPreRender event handler to the asp:DropDownList 

Private Sub mydropdown_PreRender(ByVal sender As Object, ByVal e As System. 

EventArgs) Handles mydropdown.PreRender 

Dim ddl As DropDownList = TryCast(sender, DropDownList) 

ddl.Items.Add("Option") 

End Sub 


C. Add the following event handler to the page code-behind. 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) 

Handles Me.Load 

Dim ddl As DropDownList = TryCast(Page.FindControl("mydropdown"), 

DropDownList) 

Dim lbl As Label = New Label() 

lbl.Text = "Option" 

lbl.ID = "Option" 

ddl.Controls.Add(lbl) 

End Sub 


D. Add the following event handler to the page code-behind. 

Private Sub Page_LoadComplete(ByVal sender As Object, ByVal e As System. 

EventArgs) Handles Me.LoadComplete 

TryCast(Page.FindControl("mydropdown"), DropDownList) 

ddl.Items.Add("Option") 

End Sub 


Answer: B 


70-515 real exam

Real sample 70-515 questions:

Q101. You create a Web page that has an ASP.NET menu. You need to ensure that the menu items are populated from an array of strings in your code-behind file. What should you do? 

A. Write a JavaScript function that uses document.write to write out an asp:MenuItem for each string array element. 

B. In the Page_Render handler, use Response.Write to write out an asp:MenuItem for each string array element. 

C. Set the DataSource attribute of asp:Menu to the name of the array. 

D. In the Page_Load handler, create an instance of asp:MenuItem for each string array element, and add each of these instances to the menu's Items collection. 

Answer: D 


Q102. ASP.net MVC dotn display a column Using LINQ to SQL class [MetadataType(typeof(ProductMetadata))] public pertial class Product { ... } public class ProductMetadata { ... } 

A. Add the following attribute to Product class [DisplayColumn("DiscontinueDate","DiscontinueDate",false) 

B. Add the following attribute to ProductMetadata class [DisplayColumn("DiscontinueDate","DiscontinueDate",false) 

C. Add the following code segment Product class public bool ScaffoldDisable() { return false; } 

D. ProductMetaData class [ScaffoldColumn(false)] public object DiscontinueDate; 

Answer: D 


Q103. You develop an ASP.NET Web page that includes multiple WebPartZone controls, an EditorZone. Users report that they cannot customize the layout of the page by moving WebParts from one … 

You need to ensure that users can successfully move Web Parts from one zone to another. 

What should you do? 

A. Configure the Web site to enable session state. 

B. Configure the Web site to require authentication and to use personalization. 

C. Add a ProxyWebPartManager control to the page. 

D. Add a AppearanceEditorPart control to the page. 

Answer: B 


Q104. Which property of the ListView class is used to get\set the name of the data field whose value exclusively identifes every data row of a ListView when the ClientIDMode property is set to Predictable? 

A. LoadViewStateByID 

B. UniqueID 

C. ClientIDMode 

D. ClientIDRowSuffix 

Answer: D 


Q105. You are developing a Web page. The user types a credit card number into an input control named cc and clicks a button named submit. The submit button sends the credit card number to the server. A JavaScript library includes a CheckCreditCard function that returns a value of true if the credit card appears to be valid, based on its checksum. 

You need to ensure that the form cannot be used to submit invalid credit card numbers to the server. 

What should you do? 

A. Configure the input control to run on the server. On the submit button, add a server-side OnClick handler that calls CheckCreditCard and rejects the form submission if the input is invalid. 

B. On the input control, add an onChange handler that calls CheckCreditCard and cancels the form submission when the input is invalid. 

C. Configure the input control and the submit button to run on the server. Add a submit_OnClick handler that calls CheckCreditCard and rejects the form submission if the input is invalid. 

D. On the form, add an onSubmit handler that calls CheckCreditCard and cancels the form submission if the input is invalid. 

Answer: D 



see more http://www.certshared.com/exam/70-515/

Microsoft 70-515 Certification Sample Questions and Answers: http://www.braindumpsall.net/70-515-dumps/

P.S. New 70-515 dumps PDF: http://www.4easydumps.com/70-515-dumps-download.html