I'm doing a site using MVC 4. It's a site that list musics and the user can create a playlist (like a cart shopping).
I have for every music this action link that should be executed in Ajax:
@Ajax.ActionLink("Adicionar à Playlist","AddPlaylist", new { id = item.MusicaID }, new AjaxOptions {UpdateTargetId="playlist", InsertionMode=InsertionMode.Replace})
The action method from the controller returns a PartialView (the cart of playlist) and only that should update but instead of getting the whole page with that part updated I get a partial view and nothing more on the page.
This is the part where I render the PartialView:
<section id="playlist">
@Html.Partial("_PlaylistPartial")
</section>
Shouldn't this work like I have?