-2

In my application i have tab at the top of the page which should each render a new page.

The tabs are defined in the Layouts file as this will be part of the standard view.

Now i have created different views for each of the options e.g. project is one of the tabs.

So when i click the tab option how will it render the body based on the tab i have selected?

I have used the Foundation layout tabs but will need jquery hooking into it to launch an event.

Any examples or replies would be great

tereško
  • 58,060
  • 25
  • 98
  • 150
tjhack
  • 1,022
  • 3
  • 20
  • 43
  • Possible duplicate of your other question? http://stackoverflow.com/questions/9654294/jquery-ui-tabs-with-knockout-using-mvc-3-how-to-implement – Nope Apr 21 '12 at 20:49

1 Answers1

0

Try jQuery UI Tabs

Edit 1:

<div id="tabs"> 
    <ul> 
        <li><a href="#projects">Projects</a></li> 
        <li><a href="#tab-2">Tab 2</a></li> 
        <li><a href="#tab-3">Tab 3</a></li> 
    </ul> 

    <div id="projects"> 
        <% Html.RenderAction("Projects", "Home"); %> 
    </div> 

    <div id="tab-2"> 
        <% Html.RenderAction("TabTwo", "Home"); %> 
    </div> 

    <div id="tab-3"> 
        <% Html.RenderAction("TabThree", "Home"); %> 
    </div> 
</div>

Decorate your tabs action method with [ChildActionOnly] if you want methods to work using child view only.

Charandeep Singh
  • 942
  • 2
  • 7
  • 17
  • The OP already has a technology for tabs and looking at previous posts it is Jquery UI Tabs. The OP stated the tabs are on the layout page. The question, as far as I can gather, is on how to load a full view (not partial view) when clicking on one of the tabs. The question is not about what technology to use. – Nope Apr 21 '12 at 21:42
  • I have updated answer accordingly. See Edit 1. Let see if OP really cares. – Charandeep Singh Apr 22 '12 at 04:53