In this case, the browser still receives text/html content but not necessarily HTML content that makes up an entire page.As a result, if a URL that returns a partial view is directly invoked from the address bar of a browser, an incomplete page may be displayed.You can also use j Query to place a POST request and receive back a plain ack message or some JSON data.All this is well-known and, for the most part, it is mainstream practice today.The list of customers of Figure 1, therefore, might be generated from code as below.By the way, the sample code below is based on Bootstrap.Most commonly, partial views are used to componentize Razor views and make them easier to build and update.
Such data is then incorporated in the current DOM via HTML templates and libraries such as Knockout or Angular JS.
Here’s some code that illustrates the behavior of the ASP.
NET MVC endpoint reached when any of the buttons in Figure 1 are clicked.
In between SPAs and classic full page refresh solutions, there are techniques based on plain j Query calls to HTTP endpoints returning JSON data.
Technically speaking, a j Query solution is not that much different from anything you can do in a SPA; However, it is a technique that you can use just where required and appropriate but not necessarily throughout the entire solution.