MCSD Developing ASP.NET MVC 4 Web Applications

Here you have the best Microsoft 70-486 practice exam questions

  • You have 219 total questions to study from
  • Each page has 5 questions, making a total of 44 pages
  • You can navigate through the pages using the buttons at the bottom
  • This questions were last updated on November 20, 2024
Question 1 of 219

You are designing an HTML5 website.

You need to design the interface to make the content of the web page viewable in all types of browsers, including voice recognition software, screen readers, and reading pens.

What are two possible ways to achieve the goal? Each correct answer presents a complete solution.

    Correct Answer: A, D

    To ensure that the content of an HTML5 website is viewable in all types of browsers, including assistive technologies like voice recognition software, screen readers, and reading pens, two effective methods can be used. First, annotating HTML5 content elements with Accessible Rich Internet Application (ARIA) attributes can greatly improve accessibility by providing additional information to assistive technologies. ARIA attributes help in defining ways to make web content and web applications more accessible to people with disabilities. Second, using HTML5 semantic markup elements enhances the structure of web pages. Semantic elements like <article>, <section>, and <nav> clearly describe their meaning in a way that both browsers and developers can understand, which is essential for accessibility. These elements improve the ability of assistive technologies to parse and interpret the content correctly.

Question 2 of 219

DRAG DROP -

You are developing an ASP.NET MVC web application in Visual Studio 2012.

The application has a model named ReservationLocation that contains properties named City and State.

The view that displays reservations has a single text box named loc for entering the location information. The location is entered as city, state.

There are action methods that have ReservationLocation as a parameter type.

You need to ensure that the City and State properties are correctly populated.

How should you implement model binding for the ReservationLocation type? (To answer, drag the appropriate code segment to the correct location or locations.

Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)

Select and Place:

    Correct Answer:

Question 3 of 219

You are developing an ASP.NET MVC web application in Visual Studio 2012. The application requires several thousand content files. All content is hosted on the same IIS instance as the application.

You detect performance issues when the application starts.

You need to resolve the performance issues.

What should you do?

    Correct Answer: B

    To resolve performance issues arising from having several thousand content files, you should combine the content files using ASP.NET MVC bundling. Bundling reduces the number of HTTP requests by combining multiple files into one, which significantly improves the performance of the application, especially during the initial page load.

Question 4 of 219

You are developing an ASP.NET MVC application in Visual Studio. The application supports multiple cultures.

The application contains three resource files in the Resources directory:

✑ MyDictionary.resx

✑ MyDictionary.es.resx

MyDictionary.fr.resx -

Each file contains a public resource named Title with localized translation.

The application is configured to set the culture based on the client browser settings.

The application contains a controller with the action defined in the following code segment. (Line numbers are included for reference only.)

You need to set ViewBag.Title to the localized title contained in the resource files.

Which code segment should you add to the action at line 03?

    Correct Answer: C

    The correct approach to setting ViewBag.Title to a localized title contained in the resource files for multiple cultures in an ASP.NET MVC application involves directly accessing the resource using the appropriate namespace and class. The resource files under the Resources directory can be accessed using the Resources class. Therefore, using 'Resources.MyDictionary.Title' allows access to the localized string based on the current culture settings of the application. Other options involve methods that are not appropriate for this scenario or suggest different mechanisms like global or local resource objects, which are not suitable here.

Question 5 of 219

You are testing an ASP.NET application.

The test plan requires that tests run against the application's business layer.

You need to use the test project template that meets this requirement.

Which template should you use?

    Correct Answer: C

    A Unit Test Project is the appropriate template when testing an application's business layer. Unit tests are designed to validate the logic of individual components in isolation, ensuring that each part operates correctly. This aligns with the requirement to test the business layer of the ASP.NET application, making it the most suitable choice.