70-515 preparation(1 to 15) for IT specialist: Mar 2016 Edition

70-515 Royal Pack Testengine pdf

100% Actual & Verified — 100% PASS

Unlimited access to the world's largest Dumps library! Try it Free Today!

https://www.exambible.com/70-515-exam/

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

Free Certification Real IT 70-515 Exam pdf Collection

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:

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


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


Q3. You are implementing an ASP.NET application that uses data-bound GridView controls in multiple pages. You add JavaScript code to periodically update specific types of data items in these GridView controls. You need to ensure that the JavaScript code can locate the HTML elements created for each row in these GridView controls, without needing to be changed if the controls are moved from one page to another. What should you do? 

A. Replace the GridView control with a ListView control. 

B. Set the ClientIDMode attribute to Predictable in the web.config file. 

C. Set the ClientIDRowSuffix attribute of each unique GridView control to a different value. 

D. Set the @ OutputCache directives VaryByControl attribute to the ID of the GridView control. 

Answer: C 


Q4. You are implementing an ASP.NET MVC 2 application. In the Areas folder, you add a 

subfolder named Product to create a single project area. You add files named ProductController.cs and Index.aspx to the appropriate subfolders. You then add a file named Route.cs to the Product folder that contains the following code. (Line numbers are included for reference only.) 

01 public class Routes : AreaRegistration 

02 { 

03 public override string AreaName 

04 { 

05 get { return "product"; } 

06 } 


08 public override void RegisterArea( 


AreaRegistrationContext context) 

09 { 

10 context.MapRoute("product_default", 


"product/{controller}/{action}/{id}", 

new { controller = "Product", action = "Index", 

id = "" }); 


11 } 

12 } 


When you load the URL http://<applicationname>/product, you discover that the correct page is not returned. You need to ensure that the correct page is returned. 

What should you do? 

A. Replace line 10 with the following code segment. 

context.MapRoute("product_default", 

"{area}/{controller}/{action}/{id}", 

new {area="product", controller = "Product", action = "Index", id = "" }); 


B. Replace line 10 with the following code segment. 

context.MapRoute("product_default", 

"{area}", new { controller = "Product", action = "Index", id = "" }); 


C. Add the following code segment at line 11. AreaRegistration.RegisterAllAreas(); 

D. Add the following code segment to the RegisterRoutes in the Global.asax.cs file. AreaRegistration.RegisterAllAreas(); 

Answer: D 


Q5. 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 application will provide information about products manufactured by the company. 

The company has a branch office in Saudi Arabia. 

The Sales department employees of the branch office in Saudi Arabia will use the 


application. 

You are required to accomplish the following tasks: 


The application displays contents in the correct format for the employees of the Saudi Arabia office. 

Each page in the application is displayed in the right-to-left format. 

What will you do to accomplish these tasks? 

(Each correct answer represents a part of the solution. Choose two.) 


A. In the Web.config file of the Web application, set the culture attribute of the <globalization> element to "ar-SA". 

B. In the Web.config file of the Web application, set the uiCulture attribute to "ar-SA". 

C. In the Web.config file of the Web application, set the culture attribute to "SA". 

D. In the Web.config file of the Web application, set the culture attribute of the <globalization> element to "ar". 

E. Set the HTML dir attribute for the <body> element of each page to "rfl". 

Answer: AE 


70-515 free exam

Regenerate 70-515 free practice test:

Q6. Which class is used to specify a set of features to support on the XrnlReader object created by the Create method? 

A. XmlReaderSettings 

B. XmlSecureResolver 

C. XmlValidatingReader 

D. XmlTextReaderSelectMany(c => c.CustomerAddresses).Count() 

Answer: A 


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


Q8. You create a new ASP.NET MVC 2 Web application. The following default routes are created in the Global.asax.vb file. (Line numbers are included for reference only.) 

01 Shared Sub RegisterRoutes(ByVal routes As RouteCollection) 

02 

03 routes.IgnoreRoute("{resource}.axd/{*pathInfo}") 

04 


05 routes.MapRoute( 

"Default", 

"{controller}/{action}/{id}", 

New With {.controller = "Home", .action = "Index", .id = ""} 

06 End Sub 

You implement a controller named HomeController that includes methods with the following signatures. 

Function Index() As ActionResult 

Function Details(ByVal id As Integer) As ActionResult 

Function DetailsByUsername( 

ByVal username As String) As ActionResult 

You need to add a route to meet the following requirements. 

.

 The details for a user must be displayed when a user name is entered as the path by invoking the DetailsByUsername action. 


.

 User names can contain alphanumeric characters and underscores, and can be between 3 and 20 characters long. 


What should you do? 

A. Replace line 05 with the following code segment. 

routes.MapRoute("Default", "{controller}/{action}/{id}", New With {.controller = "Home", 

.action = "DetailsByUsername",.id = ""}) 


B. Replace line 05 with the following code segment. 

routes.MapRoute( "Default", "{controller}/{action}/{username}", New With {.controller = 

"Home", .action = "DetailsByUsername", .username = ""},New With {.username = 

"\w{3,20}"}) 


C. At line 04, add the following code segment. 

routes.MapRoute("Details by Username","{username}", New With {.controller = "Home", 

.action = "DetailsByUsername"}, New With {.username = "\w{3,20}"} ) 


D. At line 04, add the following code segment. 

routes.MapRoute( "Details by Username", "{id}", New With {.controller = "Home", .action = 


"DetailsByUsername"},New With {.id = "\w{3,20}"} ) 

Answer: C 


Q9. You create a Web page that contains the following code. 


You need to provide the following implementation. 

Each time the AddFile button is clicked, a new div element is created. 


The new div element is appended after the other file upload div elements and before the AddFile span. 

Each new element has a unique identifier. 

Which code segment should you use? 

A. $("#AddFile").click(function () { 

var id = "File" + ++lastId; 

var item = $(".File:first").clone(true); 

$("input:file", item).attr({ id: id, name: id }); 

item.insertBefore("#AddFile"); 

}); 


B. $("#AddFile").click(function () { 

var id = "File" + ++lastId; 

$(".File:first").clone(true).attr({ id: id, name: id }).insertBefore 

("#AddFile"); 

}); 


C. $("#AddFile").click(function () { 

var id = "File" + ++lastId; 

}); 


D. $("#AddFile").click(function () { 

var id = "File" + ++lastId; 

var item = $(".File:first").clone(true); 

$("input:file", item).attr({ id: id, name: id }); 

item.insertAfter("input[type=file]"); 

}); 


Answer: A 


Q10. You are preparing to deploy an ASP.NET application to a production server by publishing the application in Release configuration. You need to ensure that the connection string value that is stored in the web.config file is updated to the production server# s connection string value during publishing. 

What should you do? 

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

<connectionStrings> 

<add name="DB" connectionString="Server=ProdServer;Database=ProdDB;Integrated 

Security=SSPI;" providerName="Release" /> 

</connectionStrings> 


B. Add the following code to the web.config file. 


<connectionStrings> 

<add name="DB" connectionString="Server=ProdServer;Database=ProdDB;Integrated 

Security=SSPI;" xdt:Transform="Replace" xdt:Locator="Match(name)" /> 

</connectionStrings> 


C. Add the following code to the web.release.config file. 

<connectionStrings> 

<add name="DB" connectionString="Server=ProdServer;Database=ProdDB;Integrated 

Security=SSPI;" providerName="Release" /> 

</connectionStrings> 


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

<connectionStrings> 

<add name="DB" connectionString="Server=ProdServer;Database=ProdDB;Integrated 

Security=SSPI;" xdt:Transform="Replace" xdt:Locator="Match(name)" /> 

</connectionStrings> 


Answer: D 


70-515 practice test

Tested 70-515 free question:

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


Q12. You create a Web page that contains the span shown in the following line of code. 

<span id="span1">Text</span> 

You need replace the contents of the span with HTML that you download from a URL specified by a global variable named localURL. 

Which code segment should you use? 

A. $.ajax({ 

type: "GET", 

url: localURL, 

dataType: "jsonp", 

success: function(htmlText) { 

$("#span1").text(htmlText); 

}} 

); 


B. $.ajax(localURL, {}, 

function(htmlText) { 


$("#span1").html(htmlText); 

}, 

"html"); 


C. $.ajax({ 

type: "GET", 

url: localURL, 

dataType: "html", 

success: function(htmlText) { 

$("#span1").innerHTML = htmlText; 

}} 

); 


D. $.ajax({ 

type: "GET", 

url: localURL, 

success: function(htmlText) { 

$("#span1").html(htmlText); 

}} 

); 


Answer: D 


Q13. You are implementing an ASP.NET page that includes a text box. 

You need to validate values that are typed by users to ensure that only numeric values are submitted. 

Which control markup should you use? 

A. <asp:TextBox ID="txt1" runat="server" 

CausesValidation="true" 

ValidationGroup="Numeric" /> 


B. <asp:TextBox ID="txt1" runat="server" 

EnableClientScript="true" 

ValidationGroup="Numeric" /> 


C. <asp:TextBox ID="txt1" runat="server" /> 

<asp:RegularExpressionValidator ID="val1" 

runat="server" 

ControlToValidate="txt1" 

ValidationExpression="[0-9]*" 

ErrorMessage="Invalid input value" /> 


D. <asp:TextBox ID="txt1" runat="server" /> 

<asp:RegularExpressionValidator ID="val1" 

EnableClientScript="true" 

ControlToValidate="txt1" 

ValidationExpression="[0-9]*" 

ErrorMessage="Invalid input value" /> 


Answer: C 


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


Q15. You are dynamically adding controls to an ASP.NET page in the Page_Load event handler. The page will have text boxes that correspond to the columns in a database table. Each text box will be preceded by a label that displays the name of the corresponding column. 

You need to create the form so that when the user clicks the label, the corresponding text box is selected for input. 

What should you do? 

A. For each column, output the following HTML, where COL is replaced by the name of the 

column. 

<label>COL</label> 

<input name="COL" type="text" id="COL" /> 


B. For each column, output the following HTML, where COL is replaced by the name of the 

column. 

<label AssociatedControlID="COL">COL</label> 

<input name="COL" type="text" id="COL" /> 


C. For each column, create an asp:Label control and a corresponding asp:TextBox that 

have the same ID. 


D. For each column, create an asp:Label control and set the AssociatedControlID to the ID 

of the 

corresponding asp:Textbox control. 


Answer: D