Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change partial view on link press

I have something like

@{ Html.RenderPartial(@"~/Views/Management/_Main.cshtml"); }

Can I change this view without page refreshing? I mean, I want to render few partials on one place. Like gallery, may be. I mean, I press the link - some section loaded, depending on argument. First I think about - master page (Layout page). Any other ideas?

like image 845
Kirill A. Avatar asked Oct 09 '22 21:10

Kirill A.


1 Answers

You can dynamically load a partial view into a div without a page reload by using the @Ajax.ActionLink() method.

Have a look at this post.

like image 174
Dennis Traub Avatar answered Oct 12 '22 12:10

Dennis Traub