Which ActionLink should you use?

You are developing an ASP.NET MVC 2 Web application. The application contains a controller named
HomeController, which has an action named Index. The application also contains a separate area
named Blog. A view within the Blog area must contain an ActionLink that will link to the Index action
of the HomeController. You need to ensure that the ActionLink in the Blog area links to the Index
action of the HomeController. Which ActionLink should you use?

You are developing an ASP.NET MVC 2 Web application. The application contains a controller named
HomeController, which has an action named Index. The application also contains a separate area
named Blog. A view within the Blog area must contain an ActionLink that will link to the Index action
of the HomeController. You need to ensure that the ActionLink in the Blog area links to the Index
action of the HomeController. Which ActionLink should you use?

A.
Html.ActionLink(“Home”, “Index”, “Home”)

B.
Html.ActionLink(“Home”, “Index”, “Home”, New With {.area = “”}, Nothing)

C.
Html.ActionLink(“Home”, “Index”, “Home”, New With {.area = “Blog”}, Nothing)

D.
Html.ActionLink(“Home”, “Index”, “Home”, New With {.area = “Home”}, Nothing)



Leave a Reply 0

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