單項(xiàng)選擇題

You are developing an ASP.NET MVC 2 Web application. The application contains a controller named Home Controller, which has an action named Index. The application also contains a separate area named Blog. A view within the Blog area must contain an Action Link that will link to the Index action of the Home Controller. You need to ensure that the Action Link in the Blog area links to the Index action of the HomeController. Which Action Link 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)

題目列表

你可能感興趣的試題

單項(xiàng)選擇題

You are implementing an ASP.NET MVC 2 Web application that contains the following class.  Public Class DepartmentControllerInherits Controller   Shared departments As List(Of Department) =  New List(Of Department)   Function Index() As ActionResultReturn View(departments)End Function   Function Details(ByVal id As Integer) As ActionResultReturn View(departments.Find(Function(x) x.ID = id))End Function   Function ListEmployees(ByVal d As Department) As ActionResultDim employees As List(Of Employee) = GetEmployees(d)Return View (employees)End FunctionEnd Class  You create a strongly typed view that displays details for a Department instance. You want the view to also include a listing of department employees.  You need to write a code segment that will call the ListEmployees action method and output the results in place. Which code segment should you use?()

A.<%= Html.Action("ListEmployees", Model) %> 
B.<%= Html.ActionLink("ListEmployees", "Department", "DepartmentController") %> 
C.<% Html.RenderPartial("ListEmployees", Model) %>
D.<%= Html.DisplayForModel("ListEmployees") %>

微信掃碼免費(fèi)搜題