nerdexam
Microsoft

70-515 · Question #44

70-515 Question #44: Real Exam Question with Answer & Explanation

Sign in or unlock 70-515 to reveal the answer and full explanation for question #44. The question stem and answer options stay visible for context.

Question

You create an ASP.NET MVC 2 Web application that contains the following controller class. public class ProductController : Controller { static List<Product> products = new List<Product>(); public ActionResult Index() { return View(); } } In the Views folder of your application, you add a view page named Index.aspx that includes the following @ Page directive. <%@ Page Inherits="System.Web.Mvc.ViewPage" %> You test the application with a browser. You receive the following error message when the Index method is invoked: "The view 'Index' or its master was not found." You need to resolve the error so that the new view is displayed when the Index method is invoked. What should you do?

Options

  • AChange the name of the Index.aspx file to Product.aspx.
  • BCreate a folder named Product inside the Views folder.
  • CReplace the @ Page directive in Index.aspx with the following value.
  • DModify the Index method by changing its signature to the following:

Unlock 70-515 to see the answer

You've previewed enough free 70-515 questions. Unlock 70-515 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 70-515 Practice