Click here to Skip to main content
12,956,234 members (59,121 online)
Rate this:
Please Sign up or sign in to vote.
I am very new to ASP.NET MVC 4. I am wondering how if possible I can have a jQuery tabcontrol which will show a details views from different controllers on each tab.

I can set up the tab control like this in the razor view:

@model APPCENTER_MVC.ViewModels.ViewModel
    ViewBag.Title = "APPLICATION CATALOG";
@section featured {
    <section class="featured">
        <div class="content-wrapper">
            <hgroup class="title">
@section Scripts {
    <section class="Jscripts">
        <script type="text/javascript">
            $(function () {
<div id="tabs">
        @foreach (var item in Model.Category.ToList())
                <a href="tabs-@item.ID">@Html.DisplayFor(modelItem => item.Category1)</a>

[Edit] Add Code Block [/Edit]

Now I would like to add the details view for each of the created tabs for the different categories. Any help would be very much appreciated.
Posted 11-Dec-12 6:00am
Updated 11-Dec-12 7:04am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

With RenderPartial[^] you can embed any partial view. Is suppose, you should go this way. But if you really need a controller in-between, you can use RenderAction[^].
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Check out[^] You can use ajax to load each tab, rather than loading all tabs at one time...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,869
CHill60 3,550
Maciej Los 3,243
ppolymorphe 2,070
Jochen Arndt 1,973

Advertise | Privacy | Mobile
Web01 | 2.8.170525.1 | Last Updated 11 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100