From the course: Learning ASP.NET Core MVC

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Avoid page refreshes with partial rendering

Avoid page refreshes with partial rendering

From the course: Learning ASP.NET Core MVC

Start my 1-month free trial

Avoid page refreshes with partial rendering

- [Narrator] Now that I've shown you several different ways to create and use partial views, I'd like to show you one of my favorite tricks and that is how to combine the partial view concept with AJAX to only send the parts of the page that change as the user interacts with it, a technique called partial rendering. Take a look at the blog landing page. This page is designed to render the five most recent blog posts on the server along with the rest of the page including the layout. This page looks like a great opportunity to use AJAX to enhance the user's experience by allowing them to page through all of the blog posts a couple at a time without leaving the page. Let me quickly implement this paging functionality using full page navigation first with techniques that I've shown elsewhere in the course. Since I've already shown these techniques, I'm not going to walk you through it step by step. However, all the code that I show will be available in the assets folder in the exercise…

Contents