I've got a tab menu that I want to use to show different partial views depending on the menu item selection. This is how it looks like:

Something like: if the selected item is 1, then render view "whatever"...
I want to click on the 1st menu item and render the partial view for Tab1, the 2nd menu item and render the partial view for Tab2, etc...
EDIT - what I have been trying
The view:
<div class="tabs"> <ul> <li><a class="tab" id="tab1" href="#">Personal Data</a></li> <li><a class="tab" id="tab2" href="#">User Image</a></li> <li><a class="tab" id="tab3" href="#">Regional Definitions</a></li> <li><a class="tab" id="tab4" href="#">Colors and Themes</a></li> <li><a class="tab" id="tab5" href='#'>Personal Area</a></li> </ul> </div> <div id="div-for-partial"> </div> ... <script type="text/javascript"> $(function () { $('.tab').click(function () { var id = this.id; $.ajax({ type: 'POST', url: '@Url.Action("GetPartialView", "ConfigController")', data: { 'id': id }, dataType: "html", success: function (data) { $('#div-for-partial').html(data); } }); }); }); </script> The controller:
public ActionResult Index() { return View(); } [HttpPost] public ActionResult GetPartialView(string id) { switch (id) { case "tab1": return PartialView("_PersonalData"); case "tab2": return PartialView("_UserImage"); } return RedirectToAction("Index"); }
data: 'id': idmap to the controller action? I thoughtidwas only implied in the routing, so needs to be in the path.