Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET MVC jQuery Razor
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 7:00am
Edited 11-Dec-12 8: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
0 DamithSL 340
1 Maciej Los 282
2 OriginalGriff 203
3 ridoy 160
4 George Jonsson 90
0 OriginalGriff 7,953
1 DamithSL 6,139
2 Sergey Alexandrovich Kryukov 5,454
3 Maciej Los 5,293
4 Kornfeld Eliyahu Peter 4,539

Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 11 Dec 2012
Copyright © CodeProject, 1999-2014
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