HOTSPOT
You are developing an ASP.NET MVC application. The layout page of the application references the jQuery
library. You develop a view that uses the layout page. The view includes the following markup:
The application includes the following class:
When a user clicks the button, an AJAX call must retrieve the partial view and append it to the newBooks div
element.
You need to implement the AJAX request.
How should you complete the relevant code? To answer, select the appropriate code segment from each list in
the answer area.
Hot Area:
Explanation:
Example:
$.ajax({
url: this.href,
cache: false,
success: function (html) { $(“#fixedRows”).append(html); }
});
ASP MVC3 – Using partial view to append new HTML elements to page
$(‘#newBooks’).html(partialView)
will also do the job
Correct
Incorrect. Requirements specify that result must be appended to the div, not overwrite it.