c# - How do I load views independent of the site.master? -
i'm preparing application wrote in asp.net mvc light ajax-y stuff. basically, want users able go different parts of page without reloading.
to want able reload body of page.
my site master broken down head body , foot div. want able use $("body").load(whateverlink) refresh body, in case doing causes website rendered inside body.
how can successfully?
edit: page made of views, not partialviews. in theory go , convert pages partials i'm looking way around if possible. thanks
you can controllers return partial views, using jquery request , update div page content:
jquery:
function navigate(url){ $.ajax({ url: "/home/index", cache: false, success: function(html){ $("#content").html(html); } }); }
controller:
public class homecontroller : controller { public void index() { return this.partialview(); } }
Comments
Post a Comment