15 tips on How to 70-515 Test Like a Badass [136 to 150]

★ 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

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:

Q136. You are developing an ASP.NET MVC2 application. 

You add an area named Admin to the application. Admin contains a controller class name to MainController. 

You create a view named Index outside the Admin area. You need to add a link in the Index view that will call the Default action. 

Wich markup should you use? 

A. <%= Html.ActionLink("Admin","Default", "Main", new {area="admin"},null )%> 

B. <%= Html.RouteLink("Admin","Default", new {area="admin"},"Main" )%> 

C. <%= Html.RenderAction("Admin","Default", new {area="admin"}); %> 

D. <%= Html.Action("Admin","Default",new {area="admin"}) %> 

Answer: A 


Q137. A library called contosobuisness.dll has been created and u need to accept it in a page.. 

all options had the <%assembly tag but the att differed 

A. <%assembly TargetName="contosobuisness" %> 

B. <%assembly ID="contosobuisness" %> 

C. <%@ Assembly Name="contosobuisness" %> 

D. <%assembly virtualpath="contosobuisness" %> 

Answer: C 


Q138. You are implementing a read-only page that includes the following controls. 


You disable view state to improve performance. 

You need to ensure that the page is updated to display the latest data when the user clicks the refresh button. 

Which code segment should you use? 

A. protected void Page_PreInit(object sender, EventArgs e) 

if (!IsPostBack) 

gvCustomers.DataSource = GetCustomers(); 

gvCustomers.DataBind(); 


B. protected void Page_Load(object sender, EventArgs e) 

gvCustomers.DataSource = GetCustomers(); 

gvCustomers.DataBind(); 


C. protected void gvCustomers_DataBinding(object sender, EventArgs e) { 

gvCustomers.DataSource = GetCustomers(); 

gvCustomers.DataBind(); 


D. protected void Page_PreRender(object sender, EventArgs e) { 

if (!IsPostBack) 

gvCustomers.DataSource = GetCustomers(); 

gvCustomers.DataBind(); 


Answer: B 


Q139. A Web service returns a list of system users in the following format. 

<?xml version="1.0" ?> <users> 

<user id="first"> 

<name>Name of first user</name> 

<email>first@contoso.com</email> 

</user> 

<user id="second"> 

<name>Name of second user</name> 

<email>second @contoso.com</email> 

</user> 

</users> 

You need to populate a drop-down menu with the IDs and names of the users from the Web service, in the order provided by the service. 

Which code segment should you use? 

A. $.ajax({ 

type: "GET", 

url: serviceURL, 

success: function(xml) { 

$.each($(xml), function(i, item) { 

$("<option>").attr("value", id) 

.text(tx).appendTo("#dropdown"); 

}); 

}); 


B. $.ajax({ 

type: "GET", 

url: serviceURL, 

success: function(xml) { 

$(xml).find("user").each(function() { 

var id = $(this).id; 

var tx = $(this).name.text; 

$("<option>").attr("value", id) 

.text(tx).appendTo("#dropdown"); 

}); 

}); 


C. $.ajax({ 


type: "GET", 

url: serviceURL, 

success: function(xml) { 

$(xml).find("user").each(function() { 

var id = $(this).attr("id"); 

var tx = $(this).find("name").text(); 

$("<option>").attr("value", id) 

.text(tx).appendTo("#dropdown"); 

}); 

}); 


D. $.ajax({ 

type: "GET", 

url: serviceURL, 

success: function(xml) { 

xml.find("user").each(function(node) { 

var id = $(node).attr("id"); 

var tx = $(node).find("name").text(); 

$("<option>").attr("value", id) 

.text(tx).appendTo("#dropdown"); 

}); 

}); 


Answer: C 


Q140. You are implementing an ASP.NET application that uses LINQ to Entities to access and update the database. The application includes the following method to update a detached entity of type Person. 

private NorthwindContext _entities; 

public void UpdatePerson(Person personToEdit) 

You need to implement the UpdatePerson method to update the database row that corresponds to the personToEdit object. 

Which code segment should you use? 

A. _entities.People.Attach(personToEdit); _entities.ObjectStateManager.ChangeObjectState( personToEdit, EntityState.Modified); _entities.SaveChanges(); 

B. _entities.ObjectStateManager.ChangeObjectState( 

personToEdit, 

EntityState.Added); 

_entities.SaveChanges(); 


C. _entities.People.ApplyCurrentValues(personToEdit); 

_entities.SaveChanges(); 

_entities.People.Attach(new Person() { Id = personToEdit.Id }); 


D. _entities.ObjectStateManager.ChangeObjectState( 

personToEdit, 

EntityState.Modified); 

_entities.SaveChanges(); 


Answer: A 


70-515 practice

Up to the minute 70-515 practice test:

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


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


Q143. You create a Web page named TestPage.aspx and a user control named contained in a 

file named TestUserControl.ascx. 

You need to dynamically add TestUserControl.ascx to TestPage.aspx. 

Which code segment should you use? 


A. protected void Page_Load(object sender, EventArgs e) 

Control userControl = Page.LoadControl("TestUserControl.ascx"); 

Page.Form.Controls.Add(userControl); 


B. protected void Page_Load(object sender, EventArgs e) 

Control userControl = Page.FindControl("TestUserControl.ascx"); 

Page.Form.Controls.Load(userControl); 


C. protected void Page_PreInit(object sender, EventArgs e) 

Control userControl = Page.LoadControl("TestUserControl.ascx"); 

Page.Form.Controls.Add(userControl); 


D. protected void Page_PreInit(object sender, EventArgs e) 

Control userControl = Page.FindControl("TestUserControl.ascx"); 

Page.Form.Controls.Load(userControl); 


Answer: C 


Q144. You are developing a Asp.net MVC 2 application 

The following Customer class is rendered by the Html.DisplayForModel helper method. 


public class Customer 


public string FirstName { get; set;} 

public string LastName { get; set;} 

public string EmailAddress { get; set;} 

You create a partial view named Email.ascx in the Views/Shared/DisplayTemplates folder. Email.ascx performs custom formatting of e-mail addresses. 

You need to ensure that the custom formatting is applied to only the EmailAddress property. 

What should you do? 

A. Rename Email.ascx to String.ascx. 

B. Add the following attribute to the EmailAddress property. [DataType(DataType.EmailAddress)] 

C. Add the following attribute tot the EmailAddress property [UIHint("Email")] 

D. Rename Email.ascx to EmailAddress.ascx 

Answer: C 


Q145. You create a custom server control named Task that contains the following code segment. (Line numbers are included for reference only.) 


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

A. Add the following code segment to the project's AssemblyInfo.cs file. [assembly: TagPrefix("DevControls", "Dev")] 

B. Replace line 05 with the following code segment. [DefaultValue("New Task")] 

C. Insert the following code segment immediately before line 03. [ToolboxData("<{0}:Task runat=\"server\" Title=\"New Task\" />")] 

D. Replace line 10 with the following code segment. output.Write("<Dev:Task runat=\"server\" Title=\"New Task\" />"); 

Answer: AC 


70-515 practice

High value 70-515 Q&A:

Q146. You are developing an ASP.NET web page that includes a Panel Control that has ID ContentSection. 

You need to add a text box control to the Panel control. 

Which code segment should you use? 

A. this.ContentSection.Controls.Add( this.FindControl(contentSection.ID + "asp:TextBox")); 

B. this.LoadTemplate("asp:TextBox") .InstantiateIN(ContentSection); 

C. this.RequiresControlState( this.LoadControl(typeof(TextBox),null)); 

D. this.ContentSection.Controls.Add( this.LoadControl(typeof(TextBox),null)); 

Answer: D 


Q147. You are creating an ASP.NET Web application that uses the SqlMembershipProvider. You plan to test locally and deploy to multiple production servers. You need to ensure that each deployed application accesses the same production database in Microsoft SQL Server. 

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

A. Run the aspnet_regsql command to create the database on the appropriate SQL Server computer. 

B. Right-click App_Data in your Visual Studio 2010 project, click Add, and select New Item to create the SQL Server database on the appropriate SQL Server computer. 

C. Modify the connection string in the web.config file to specify the names of the production server and database. 

D. Modify the web.release.config file to transform the connection string to specify the names of the production server and database. 

Answer: AD 


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

A. Cache.Insert("ActiveBugs", result, null, DateTime.Now.AddSeconds(60), TimeSpan. 

FromSeconds(15)); 


B. Cache.Insert("Trigger", DateTime.Now, null, DateTime.Now.AddSeconds(60), Cache. 

NoSlidingExpiration); 

CacheDependency cd = new CacheDependency(null, new string[] { "Trigger" }); 

Cache.Insert("ActiveBugs", result, cd, Cache.NoAbsoluteExpiration, TimeSpan. 

FromSeconds(15)); 


C. Cache.Insert("ActiveBugs", result, null, Cache.NoAbsoluteExpiration, TimeSpan. 

FromSeconds(15)); 

CacheDependency cd = new CacheDependency(null, new string[] { "ActiveBugs" }); 

Cache.Insert("Trigger", DateTime.Now, cd, DateTime.Now.AddSeconds(60), Cache. 

NoSlidingExpiration); 


D. CacheDependency cd = new CacheDependency(null, new string[] { "Trigger" }); 

Cache.Insert("Trigger", DateTime.Now, null, DateTime.Now.AddSeconds(60), Cache. 

NoSlidingExpiration); 

Cache.Insert("ActiveBugs", result, cd, Cache.NoAbsoluteExpiration, TimeSpan. 

FromSeconds(15)); 


Answer: B 


Q149. You are developing an ASP.NET application by using Visual Studio 2010. You need to interactively debug the entire application. 

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

A. Set the Debug attribute of the compilation node of the web.config file to true. 

B. Add a DebuggerDisplay attribute to the code-behind file of the page that you want to debug. 

C. Select the ASP.NET debugger option in the project properties. 

D. Define the DEBUG constant in the project settings. 

Answer: AC 


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



see more TS: Web Applications Development with Microsoft .NET Framework 4