5

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?

Kirill A.
  • 1,695
  • 3
  • 13
  • 14

1 Answers1

4

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.

Community
  • 1
  • 1
Dennis Traub
  • 50,557
  • 7
  • 93
  • 108
  • Hi, In my scenario, I want to switch between short view and extended view. I placed an `Ajax.ActionLink` in the short view and I set the `UpdateTargetId` to a parent div's id. Now when I click the link the ajax result replaces the entire page. – Shimmy Weitzhandler Jun 28 '13 at 02:29