How to render partial view in MVC5 via ajax call to a controller and return HTML
There is built-in ajax helpers in ASP.NET MVC which can cover the basic scenarios. You need to install and refer jquery.unobtrusive-ajax JavaScript library ( + jQuery dependency). Then in your main view (let’s say index.cshtml) put following code: Index.cshtml @Ajax.ActionLink(“Load More Posts”, “MorePosts”, new AjaxOptions() { HttpMethod = “GET”, AllowCache = false, InsertionMode = InsertionMode.InsertAfter, … Read more