Tips to Pass 70-515 Exam (46 to 60)

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:

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


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


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


Q49. You are implementing an ASP.NET page. The page includes a method named GetCustomerOrderDataSet that returns a DataSet. The DataSet includes a DataTable named CustomerDetailsTable and a DataTable named OrderDetailsTable. You need to display the data in OrderDetailsTable in a DetailsView control named dtlView. Which code segment should you use? 

A. dtlView.DataSource = GetCustomerOrderDataSet(); 

dtlView.DataMember = "OrderDetailsTable"; 

dtlView.DataBind(); 


B. dtlView.DataSource = GetCustomerOrderDataSet(); 

dtlView.DataSourceID = "OrderDetailsTable"; 

dtlView.DataBind(); 


C. dtlView.DataSource = GetCustomerOrderDataSet(); 

dtlView.DataKeyNames = new string [] { "OrderDetailsTable"}; 

dtlView.DataBind(); 


D. DataSet dataSet = GetCustomerOrderDataSet(); 

dtlView.DataSource = new DataTable("dataSet", "OrderDetailsTable"); dtlView.DataBind(); 


Answer: A 


Q50. 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<T> 

B. IEnumerable<T> 

C. IEnumerator<T> 

D. IEqualityComparer<T> 

Answer: B 


70-515  actual test

Most up-to-date 70-515 vce:

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

The Web application connects to a SQL Server database. 

You use the ADO.NET Entity Framework to handle persistence-ignorant entities. 

You create an ObjectContext object named ObjContext. 

Subsequently, you change properties on numerous entities. 

You are required to save the changed entity values in the SQL Server database. 

Which of the following code segments will you use? 

A. ObjContext.SaveChanges(SaveOptions.DetectChangesBeforeSave); 

B. ObjContext.SaveChanges(SaveOptions.AcceptAllChangesAfterSave); 

C. ObjContext.SaveChanges(SaveOptions.All); 

D. ObjContext.SaveChanges(SaveOptions.None); 

Answer: A 


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


Q53. You are implementing a Web page that allows users to upload files to a Web server. The page includes a form that has a Submit button. You need to reject files larger than 1 MB. What should you do? 

A. Add an HTML input type= file control. Add an onSubmit handler to the form to check the file size and cancel the form submission if the file size is too large. 

B. Add an HTML input type= file control. Add an onChange handler to the input control to check the file size and cancel the upload if the file size is too large. 

C. Add an ASP.NET FileUpload control and configure it to run on the server. Add a server-side OnClick handler to the form's Submit button to save the file only if the file size is allowed. 

D. Add an ASP.NET FileUpload control and configure it to run on the server. Add a server-side OnDataBinding handler that saves the file only if the file size is allowed. 

Answer: C 


Q54. 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 holds a Web page named MyHome.aspx. 

You are creating a button with a rolloverimage on MyHome.aspx. 

However, when mouse hovered over the button image, the rolloverimage is retrieved from the server in a separate request. 

You need to use an improved rollover button in which the button‘s rolloverimage is already downloaded and stored in the browser's cache, as a result when you hover over the button, it is instantly displayed. 

What will you do to accomplish this? 

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

A. Use JavaScript Object Notation. 

B. Use the RegisterClientScriptBlock method. 

C. Use the RegisterClientScriptlnclude method. 

D. Build a JavaScript function. 

E. Use the RegisterClientScriptResource method. 

Answer: BD 


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


70-515  actual test

Guaranteed 70-515 :

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


Q57. You are implementing an ASP.NET AJAX page that contains two div elements. You need to ensure that the content of each div element can be refreshed individually, without requiring a page refresh. What should you do? 

A. Add two forms to the page. 

Add a script manager and an update panel to each form. 

Add a content template to each update panel, and move each div element into a content 

template. 


B. Add two forms to the page. 

Add a script manager and an update panel to each form. 

Add a content template to each update panel, and move each div element into a content 

template. 


C. Add a form and two update panels to the page. 

Add a script manager to the form. 

Add a content template to each update panel, and move a div element into each content 

template. 


D. Add a form and two update panels to the page. 

Add two script managers to the form, one for each update panel. 

Add a content template to each update panel, and move each div element into a content 

template. 


Answer: C 


Q58. You are implementing an ASP.NET Web page. 

You need to add a text box that allows only values between 1 and 10, inclusive, to be submitted. 

Which two code segments should you use? (Each correct answer presents part of the solution. Choose two.) 

A. <script type="text/javascript"> 

function validate_value(obj, args) { 

return 

(args.Value >= 1 && args.Value <= 10); 

</script> 


B. <script type="text/javascript"> 

function validate_value(obj, args) { 

args.IsValid = 

(args.Value >= 1 && args.Value <= 10); 

</script> 


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

<asp:CustomValidator ID="val1" runat="server" 

ControlToValidate="txt1" 

ClientValidationFunction="validate_value" 

ErrorMessage="Value invalid" /> 


D. <asp:TextBox ID="txt1" runat="server" onChange="validate_value(this, args)" /> 


Answer: BC 


Q59. Which tool is used to simplify the migration, management and deployment of IIS Web servers, Web applications and Web sites? 

A. System Designer 

B. XCOPY deployment 

C. Deployment Designer 

D. Web Deployment 

Answer: D 


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



see more 70-515 dumps