nerdexam
Microsoft

70-515 · Question #35

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

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

Question

You create a new ASP.NET MVC 2 Web application. The following default routes are created in the Global.asax.cs file. (Line numbers are included for reference only.) 01 public static void RegisterRoutes(RouteCollection routes) 02 { 03 routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); 05 routes.MapRoute("Default", "{controller}/{action}/{id}", new {controller = "Home", action = "Index", id = ""}); 06 } You implement a controller named HomeController that includes methods with the following signatures. public ActionResult Index() public ActionResult Details(int id) public ActionResult DetailsByUsername(string username) You need to add a route to meet the following requirements. - The details for a user must to be displayed when a user name is entered as the path by invoking the DetailsByUsername action. - User names can contain alphanumeric characters and underscores, and can be between 3 and 20 characters long. What should you do?

Options

  • AReplace line 05 with the following code segment.
  • BReplace line 05 with the following code segment.
  • CAt line 04, add the following code segment.
  • DAt line 04, add the following code segment.

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