What should you do?

You are implementing an ASP.NET MVC 2 application.
In the Areas folder, you add a subfolder named Product to create a single project area.
You add files named ProductController.cs and Index.aspx to the appropriate subfolders.
You then add a file named Route.cs to the Product folder that contains the following code. (Line numbers are included for reference only.)

When you load the URL http://<applicationname>/product, you discover that the correct page is not returned.
You need to ensure that the correct page is returned.
What should you do?
A. Replace line 10 with the following code segment.
context.MapRoute("product_default", "{area}/{controller}/{action}/{id}", new {area = "product", controller = "Product", action = "Index", id = ""});
B. Replace line 10 with the following code segment.
context.MapRoute("product_default", "area}",
C. Add the following code segment at line 11
AreaRegistration.RegisterAllAreas();
D. Add the following Code segment to the Register Routes in Global.asax.cs file.
AreaRegistration.RegisterAllAreas();

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.