Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7523877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:55:43+00:00 2026-05-30T02:55:43+00:00

I want to build a webpage which has 3 tabs (and thus 3 divs):

  • 0

I want to build a webpage which has 3 tabs (and thus 3 divs):
Tab 1 – Update Personal Details
Tab 2 – Check Order
Tab 3 – Change logon details

There are 2 ways to implement this as far as I can tell, but would like to know best practice.

First would be to have 3 Partial Views that implement a separate Model each
Second would be to have 3 Partial Views that implement a single ViewModel

The first option if using Partial Views will cause an error of “Expect Model A but got Model B”
I believe you can use RenderAction to get around this, but is that best practice?

Opinions welcome.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T02:55:45+00:00Added an answer on May 30, 2026 at 2:55 am

    Looking at the names of the tabs, ‘Update Personal Details’, ‘Check Order’ and ‘Change logon details’ – it seems that these are fairly different, but related options that a user could do.

    To me, it would make sense to split these up into three different actions with three different views, meaning that you only render the action for the visible tab. This way, if the user only wanted to, say, update their details, the server isn’t doing up the DB queries to check the order

    You would use some css to style it up so that it looks like three tabs, but each tab really would be a link which which did a new request, just making it look like there were three tabs.

    e.g.

    <div id="content">
        <ul>
           <li class="active">Update Personal Details</li>
           <li>@Html.ActionLink("Check Order","CheckOrder")</li>
           <li>@Html.ActionLink("Update Logon Details","UpdateLogonDetails")</li>
        </ul>
        <div id="tab1" />
         ... Update Personal Details Tab... etc
        </div>
        ... tab2 and tab 3 not included...
    </div>
    

    The actions for CheckOrder and UpdateLogonDetails would render essentially the same view, but a different tab would be showing.

    This would create the illusion that it was all run using tabs, even though it wasn’t.

    Then, when you had that all running, you could update those links using JQuery to fire the requests via AJAX, returning the results as Partial Views and updating the content div with the result. This means that people with Javascript enabled get the proper ‘ajax’ experience, but that it still works OK for those with javascript disabled.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to build a FireFox addon that can capture a webpage as an
I want to build a simple website that can download a webpage www.example.com/index.html and
I want to build a Web page (in Asp.Net) containing a Dynamic Menu where
i want build a photography app with effects . e.g. old images with brown
I want build a sketch pad app on iPhone, I assume that this type
i want to build a screen for user to get his marks on competitions,
I want to build flash application that can detect the user eyes color and
I want to build a form_tag that will allow me to post a new
I want to build a python program that deletes all the photos from my
I want to build a basic Client-Server application, where my android smartphone can stream

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.