c# - ASP.NET MVC Razor - Navigate without refresh master page -
in mvc application (using razor) want avoid master page refresh every time click on link.
my master page has structure:
<html> .... <div id="main"> @renderbody() </div> ... </html>
link buttons can both in master page , in content page. how must structured pages?
every time view retrieved using standard call, master view refreshed.
if want avoid this, should create views using partialviews, , ajax calls. so, when click link, ajax call performed, partial view retrieved , dom element (usually div) filled contents of partial view.
doing hand possible have face lot of issues. if want spa (single page application) start looking angularjs, durandal, backbone or javascript library on this! (i. e. take @ http://www.codeproject.com/articles/709766/tutorial-for-building-spa-using-angularjs).
Comments
Post a Comment