15 tips on testking 70-515 pdf download

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:

Q211. You are adding new capabilities to an ASP.NET Web site. The site currently connects to a Microsoft SQL database by using the…. of the CONTOSO\AppIdentity account, which has been granted access to only objects within the database. 

The application requires the following implementation. 

.Database objects that support ASP.NET roles must be added to the existing database. 

.The CONTOSO\AppIdentity user must be granted only the minimum privileges that are required to support all features of ASP.NET……. 

You need to add the ASP.NET roles support. 

Which two actions should you perform? 

A. Use the aspnet_regsql tool. 

B. Use the aspnet_regiis tool. 

C. Add the CONTOSO\AppIdentity user to the aspnet_Roles_FullAccess database role. 

D. Add the CONTOSO\AppIdentity user to the db_accessadmin database role. 

Answer: AC 


Q212. 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. Row Updated 

D. RowEditing 

Answer: A 


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

A. Place the JavaScript in a file named controls.js and add the following code line to the 

Page_Load method of each control. 

Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "script", 

"controls.js"); 


B. Add the following code line to the Page_Load method of each control, where 

strJavascript contains the JavaScript code for the control. 

Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "script", 

strJavascript); 


C. Add the following code line to the Page_Load method of each control, where 

CLASSNAME is the name of the control class and strJavascript contains the JavaScript 

code for the control. 

Page.ClientScript.RegisterStartupScript(typeof(CLASSNAME), "script", 

strJavascript); 


D. Add the following code line to the Page_Load method of each control, where 

CLASSNAME is the name of the control class and strJavascript contains the JavaScript 

code for the control. 

Page.ClientScript.RegisterClientScriptBlock(typeof(CLASSNAME), "script", 

strJavascript); 


Answer: D 


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


Q215. You create a Web page that contains the following code. (Line numbers are included for reference only.) 

01 <script> 

02 function changeColor(c) { 

03 document.getElementById("message").style.color=c; 

04 } 

05 </script> 


07 <p id="message">Welcome!</p> 

08 <ul id="color"> 

09 <li>Black</li> 

10 <li>Red</li> 

11 </ul> 


You need to ensure that when the user clicks an item in the list, the text color of the Welcome! message will change. Which declaration should you use? 

A. <ul id="color"> <li onclick="changeColor(this.innerText);">Black</li> <li onclick="changeColor(this.innerText);">Red</li> </ul> 

B. <ul id="color"> <li onclick="changeColor(this.style.color);">Black</li> <li onclick="changeColor(this.style.color);">Red</li> </ul> 

C. <ul id="color"> <li><a onfocus="changeColor(this.innerText);">Red</a></li> <li><a onfocus="changeColor(this.innerText);">Black</a></li> </ul> 

D. <ul id="color"> <li><a onfocus="changeColor(this.style.color);">Red</a></li> <li><a onfocus="changeColor(this.style.color);">Black</a></li> </ul> 

Answer: A 


70-515 test preparation

Down to date dumps for mcts 70-515:

Q216. You are implementing an ASP.NET Web application. Users will authenticate to the application with an ID. The application will allow new users to register for an account. The application will generate an ID for the user based on the users full name. You need to implement this registration functionality. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.) 

A. Configure the SqlMembershipProvider in the web.config file. 

B. Configure the SqlProfileProvider in the web.config file. 

C. Create an ASP.NET page that contains a default CreateUserWizard control to create a new user account. 

D. Create an ASP.NET page that contains a custom form that collects the user information and then uses the Membership.CreateUser method to create a new user account. 

Answer: AD 


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

A. Change the name of the Index.aspx file to Product.aspx. 

B. Create a folder named Product inside the Views folder. Move Index.aspx to the Product folder. 

C. Replace the @ Page directive in Index.aspx with the following value. <%@ Page Inherits="System.Web.Mvc.ViewPage<Product>" %> 

D. Modify the Index method by changing its signature to the following: public ActionResult Index(Product p) 

Answer: B 


Q218. You are implementing an ASP.NET application that includes the following requirements. Retrieve the number of active bugs from the cache, if the number is present. If the number is not found in the cache, call a method named GetActiveBugs, and save the result under the ActiveBugs cache key. Ensure that cached data expires after 30 seconds. You need to add code to fulfill the requirements. Which code segment should you add? 

A. int numOfActiveBugs = (int)Cache["ActiveBugs"]; 

if (!numOfActiveBugs.HasValue) 

int result = GetActiveBugs(); 

Cache.Insert("ActiveBugs", result, null, 

DateTime.Now.AddSeconds(30), Cache.NoSlidingExpiration); 

numOfActiveBugs = result; 

ActiveBugs = numOfActiveBugs.Value; 


B. int numOfActiveBugs = (int) Cache.Get("ActiveBugs"); 

if (numOfActiveBugs != 0) 

int result = GetActiveBugs(); 

Cache.Insert("ActiveBugs", result, null, 

DateTime.Now.AddSeconds(30), Cache.NoSlidingExpiration); 

numOfActiveBugs = result; 

ActiveBugs = numOfActiveBugs; 


C. int numOfActiveBugs = 0; 

if (Cache["ActiveBugs"] == null) 

int result = GetActiveBugs(); 

Cache.Add("ActiveBugs", result, null, DateTime.Now.AddSeconds(30), 

Cache.NoSlidingExpiration, 

CacheItemPriority.Normal, null); Cache.NoSlidingExpiration, CacheItemPriority.Normal, 


null); 

numOfActiveBugs = result; 

ActiveBugs = numOfActiveBugs; 


D. int numOfActiveBugs = (int?)Cache["ActiveBugs"]; 

if (!numOfActiveBugs.HasValue) 

int result = GetActiveBugs(); 

Cache.Insert("ActiveBugs", result, null, 

Cache.NoAbsoluteExpiration, TimeSpan.FromSeconds(30)); 

numOfActiveBugs = result; 

ActiveBugs = numOfActiveBugs.Value; 


Answer: A 


Q219. Which of the following is the correct collection of build events? 

A. Pre-Build, Post-Link, and Pre-Link 

B. Pre-Build, Post-Build, and Post-Link 

C. Pre-Build, Pre-Link, and Post-Build 

D. Post-Link, Pre-Link, and Post-Build 

Answer: C 


Q220. 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 Sub Page_Load(ByVal sender As Object, 

ByVal e As System.EventArgs) Handles Me.Load 

Dim s As String = Master.CityName 

End Sub 

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: A 


70-515 free practice questions

Tested mcts certification 70-515:

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

01Namespace DevControls 03 Public Class Task 04 Inherits WebControl 06 <ComponentModel.DefaultValue("")> 

07 Public Property Title As String 

09 Protected Overrides Sub RenderContents( 

10 ByVal output As HtmlTextWriter) 

12 output.Write(Title) 

13 End Sub 

15 End Class 

17 End Namespace 

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.vb file. <Assembly: TagPrefix("DevControls", "Dev")> 

B. Replace line 06 with the following code segment. <ComponentModel.DefaultValue("New Task")> 

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

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

Answer: AC 


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


Q223. You are developing an ASP.NET MVC 2 Web application that displays product details. 

The global.asax.cs file contains the following code segment 

01 public static void registerRoutes(RouteCollection routes) 

02 { 

03 routes.IgnoreRoute(“{resource}.axd/{*pathInfo}”); 

04 routes.MapRoute(“Default”, “{controller}/{action}/{id}”, new {controller = “Home”, action = “index”, id = 

UrlParameter.Optional}); 

05 } 

The URL “/products/PRODUCTNAME”, where PRODUCTNAME is the name of the product, must give details for the product that is stored in a Microsoft SQL Server database. 

You need to ensure that the routes are registered correctly. 

What should you do? 

A. Replace line 04 with the following code segment 

routes.MapRoute(“products/{productName}, “ProductDetails”, new {controller = “Products”, 

action = “index”, 

productName = UrlParameter.Optional}); 


B. Add the following code segment between lines 04 and 05 

routes.MapRoute(“ProductDetails, “products/{productName}”, new {controller = “Products”, 

actions=”index”, 

productName = UrlParameter.Optional}); 


C. Replace lines 03 and 04 with the following code segment 

routes.MapRoute(“products/{productName}”, “ProductDetails”, new {controller =”Products”, 

action=”Index”, 

productName=UrlParameter.Optional}); 


D. Add the following code segment between lines 03 and 04. 

routes.MapRoute(“ProductDetails”,”products/{productName}”, new {controller=”products”, 

action =”Index”, 

productName = UrlParameter.Optional}); 


Answer: D 


Q224. You are developing an ASP.NET web application. 

The application consumes a WCF service that implements a contract named IcontosoService. 

The service is located on the local network and is exposed using the following endpoint <endpoint name=”udpDiscover” kind=”udpDiscoveryEndpoint”/> 

You need to consume the service by using the WS-Discovery protocol. 

Which client endpoint configuration should you use? 

A. <endpoint name=”contosoEndpoint” address=”oneway-basic” 

binding=”basicHttpBinding” 

contract=”IContosoService”/> 


B. <endpoint name=”contosoEndpoint” kind=”dynamicEndpoint” binding=”wsHttpBinding” 

contract=”IContosoService”/> 


C. <endpoint name=”contosoEndpoint” address=”twoway-basic” 

binding=”basicHttpBinding” 

contract=”IContosoService”/> 


D. <endpoint name=”contosoEndpoing” address=”dynamicEndpoint” 

binding=”wsHttpBinding” contract=”*”/> 


Answer: B 


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



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

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