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

    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) 03 routes.IgnoreRoute("{resource}.axd/{*pathInfo}") 05 routes.MapRoute(_ "Default",

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

    New With {.controller = "Home", .action = "Index", .id = ""} ) 07 End Sub

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

    Function About() As ActionResult

    Function Index() As ActionResult

    Function Details(ByVal id As Integer) As ActionResult

    You need to ensure that the About action is invoked when the root URL of the site is accessed.

    What should you do?

    A. At line 04 in the Global.asax.vb file, add the following line of code.routes.MapRoute("Default4Empty", "/",New With {.controller = "Home", .action = "About"})
    B. At line 04 in the Global.asax.vb file, add the following line of code.routes.MapRoute("Default", "",New With {.controller = "Home", .action = "About"})
    C. Replace line 05 in the Global.asax.vb file with the following line of code.routes.MapRoute ("Default4Empty","{controller}/{action}/{id}",New With {.controller = "Home", .action = "About", .id = ""} )
    D. Replace line 05 in the Global.asax.vb file with the following line of code.routes.MapRoute ("Default","{controller}/{action}",New With {.controller = "Home", .action = "About"} )

  • Question 252:

    You are implementing an ASP.NET page. Client-side script requires data. Your application includes a class named Person with a Name property of type string.

    The code-behind file of the page includes the following code segment.

    Public JsonValue As String

    Dim people As List(Of Person) = GetPeopleList()

    Dim json As JavaScriptSerializer = New JavaScriptSerializer()

    You need to use the JavaScriptSerializer class to serialize only the value of the Name property of each item in the people list.

    Which code segment should you use?

    A. JsonValue = json.Serialize(people.Select(Function(p) p.Name))
    B. Dim names = From person In people Select person JsonValue = "{" and json.Serialize(names) and "}"
    C. JsonValue = json.Serialize(people.SelectMany( Function(p) p.Name.AsEnumerable()))
    D. Dim names = From person In people Select person JsonValue = json.Serialize(names)

  • Question 253:

    You are developing an ASP.NET MVC 2 Web application.

    A page makes an AJAX request and expects a list of company names in the following format.

    ["Adventure Works","Contoso"]

    You need to write an action method that returns the response in the correct format.

    Which type should you return from the action method?

    A. AjaxHelper
    B. XDocument
    C. JsonResult
    D. DataContractJsonSerializer

  • Question 254:

    You are developing an ASP.NET web application. Your designer creates a theme named General for general use in the application.

    The designer also makes page-specific changes to the default properties of certain controls. You need to apply the General theme to all pages, and you must ensure that the page-specific customizations are preserved.

    What should you do?

    A. Add the following configuration to the web.config file.Set the following page directive on pages that have customizations.
    B. Add the following configuration to the web.config file.
    C. Add the following configuration to the web.config file.Set the following page directive on pages that have customizations.
    D. Add the following configuration to the web.config file.Set the following page directive on pages that have customizations.

  • Question 255:

    You are implementing an ASP. NET MVC 2 Web application.

    You add a controller named CompanyController.

    You need to modify the application to handle the URL path /company/info.

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

    A. Add the following method to the CompanyController class.Function Info () As ActionResultReturn View ()End Function
    B. Add the following method to the CompanyController class.Function Company_Info() As ActionResultReturn View()End Function
    C. Right-click the Views folder, and select View from the Add submenu to create the view for the action.
    D. Right-click inside the action method in the CompanyController class, and select Add View to create a view for the action.

  • Question 256:

    You are implementing an ASP.NET page in an e-commerce application. Code in a btnAddToCart_Click event handler adds a product to the shopping cart. The page should check the status of the shopping cart and always show a cart icon when one or more items are in the shopping cart. The page should hide the icon when the shopping cart has no items. You need to add an event handler to implement this requirement.

    Which event handler should you add?

    A. btnAddToCart_Click
    B. Page_Load
    C. Page_PreRender
    D. Page_PreInit

  • Question 257:

    You are implementing an ASP.NET Web site that uses a custom server control named Task. Task is defined as shown in the following list.

    稢lass name: Task種amespace: DevControls稟ssembly: TestServerControl.dll

    稡ase class: System.Web.UI.WebControls.WebControl

    You copy TestServerControl.dll to the Web sites Bin folder.

    You need to allow the Task control to be declaratively used on site pages that do not contain an explicit @ Register directive.

    Which configuration should you add to the web.config file?

  • Question 258:

    You are developing an ASP.NET web page.

    The page must display data from XML file named Inventory.xml. Inventory.xml contains data in the following format.

    ....

    ....

    You need to display Vehicle elements that have the inStock attribute set to YES. Wich two controls should you add to the page? (Each control presents part of the solution.Choose two.)

    A. ....
    B. ....
    D. Inventory.xml

  • Question 259:

    You create a Web page that has an ASP.NET menu. You need to ensure that the menu items are populated from an array of strings in your code-behind file. What should you do?

    A. Write a JavaScript function that uses document.write to write out an asp:MenuItem for each string array element.
    B. In the Page_Render handler, use Response.Write to write out an asp:MenuItem for each string array element.
    C. Set the DataSource attribute of asp:Menu to the name of the array.
    D. In the Page_Load handler, create an instance of asp:MenuItem for each string array element, and add each of these instances to the menu's Items collection.

  • Question 260:

    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.

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.