70-515 Exam Details

  • Exam Code
    :70-515
  • Exam Name
    :TS: Web Applications Development with Microsoft .NET Framework 4
  • Certification
    :Microsoft Certifications
  • Vendor
    :Microsoft
  • Total Questions
    :285 Q&As
  • Last Updated
    :Jan 26, 2022

Microsoft 70-515 Online Questions & Answers

  • Question 161:

    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
    B. IEnumerable
    C. IEnumerator
    D. IEqualityComparer

  • Question 162:

    You are troubleshooting an ASP.NET Web application. System administrators have recently expanded your web farm from one to two servers. Users are periodically reporting an error message about invalid view state. You need to fix the problem. What should you do?

    A. Set viewStateEncryptionMode to Auto in web.config on both servers.
    B. Set the machineKey in machine.config to the same value on both servers.
    C. Change the session state mode to SQLServer on both servers and ensure both servers use the same connection string.
    D. Override the SavePageStateToPersistenceMedium and LoadPageStateFromPersistenceMedium methods in the page base class to serialize the view state to a local web server file.

  • Question 163:

    You are developing an ASP.NET Web page.

    The page uses the MicrosoftAjax.js script file and the MicrosoftAjaxWebForms.js script file. You need to ensure that both scripts are combined into a single script.

    Which markup should you use?

  • Question 164:

    You create a Web page that contains the following div.

    You have a JavaScript array named imageurls that contains a list of image URLs.

    You need to write a JavaScript function that will insert images from the URLs into target.

    Which code segment should you use?

    A. $( imageurls ).each(function( i,url ){$("< img />", url ).append("#target"); });
    B. $( imageurls ).each(function( i,url ){ $("#target") += $("< img />"). attr (" src ", url ); });
    C. $.each( imageurls , function( i,url ){ $("< img />"). attr (" src ", url ). appendTo ("#target"); });
    D. $.each( imageurls , function( i,url ){ $("#target").append("< img />"). src = url ; });

  • Question 165:

    You are developing an ASP.NET Web application.The application is configured to use the membership and role providers.

    You need to allow all users to perform an HTTP GET for application resources, but you must allow only the user named Moderator to perform a POST operation.Which configuration should you add to the web.config file?

  • Question 166:

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

    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. BlackRed
    B. BlackRed
    C. RedBlack
    D. BlackRed
    E. RedBlack

  • Question 167:

    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 segmentroutes.MapRoute("products/{productName}, "ProductDetails", new {controller = "Products", action = "index",productName = UrlParameter.Optional});
    B. Add the following code segment between lines 04 and 05routes.MapRoute("ProductDetails, "products/{productName}", new {controller = "Products", actions="index",productName = UrlParameter.Optional});
    C. Replace lines 03 and 04 with the following code segmentroutes.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});

  • Question 168:

    You are implementing an ASP.NET MVC 2 Web application that allows users to view and edit data. You need to ensure that only logged-in users can access the Edit action of the controller. What are two possible attributes that you can add to the Edit action to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

    A. [Authorize(Users = "")]
    B. [Authorize(Roles = "")]
    C. [Authorize(Users = "*")]
    D. [Authorize(Roles = "*")]

  • Question 169:

    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.
    B. Add the following directive to TestPage.aspx.
    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.

  • Question 170:

    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. Private Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit If Not IsPostBack Then gvCustomers.DataSource = GetCustomers() gvCustomers.DataBind() End If End Sub
    B. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load gvCustomers.DataSource = GetCustomers() gvCustomers.DataBind() End Sub
    C. Private Sub gvCustomers_DataBinding(ByVal sender As Object, ByVal e As System.EventArgs) Handles gvCustomers.DataBinding gvCustomers.DataSource = GetCustomers() gvCustomers.DataBind() End Sub
    D. Private Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender If Not IsPostBack Then gvCustomers.DataSource = GetCustomers() gvCustomers.DataBind() End If End Sub

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Microsoft exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 70-515 exam preparations and Microsoft certification application, do not hesitate to visit our Vcedump.com to find your solutions here.