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

  • SEARCH
  • Home
  • 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 7664375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:17:20+00:00 2026-05-31T14:17:20+00:00

I’m trying to make a simple website using mvc but I’m a little confused

  • 0

I’m trying to make a simple website using mvc but I’m a little confused about how to structure everything. Are there any guidelines for this sort of thing?

What I’m having difficulty with is knowing how to deal with a lot of nested pages, and how to use ViewModels, or rather when

I’ve built a site in MVC before but it was incredibly simple: there was only about 5 pages total so it wasn’t difficult to build. In my current situation, I’m trying to build a site that has a number of nested pages and I wonder how I structure this.

For example, if I had a structure something like this:

                                        Home
                                          |
                        About -------- Contact---------- Products
                          |
                          |
           The Board -- What we do
             |
             |
 person1 -- person2 -- person3

How should I set up my site structure?

My gut feeling is that I should have an AboutController, a ContactController and a ProductsController. I’d then have two ActionResults called ‘TheBoard’ and ‘WhatWeDo’ in the AboutController but then how do I handle the nested pages of ‘TheBoard’? What if I had even more pages nested underneath this? Would I have nested Controllers?

Also, even though this dummy site doesn’t require it, what if I wanted to share ViewModels? I’m assuming a ViewModel can be shared across pages (assuming the same functionality is required). Or is this bad practice? Should a new ViewModel be created for each page?

Apologies if I haven’t explained this very well. Basically what I’m looking for is any resources on how to structure an MVC 3 web app that contains a lot of pages. Are there any basic principles that should be followed? I’ve followed most of the tutorials on the asp.net site but there weren’t really any guidelines on best practices.

Any ideas?

Thanks

EDIT: Just to clarify, if I was building this site using webforms, I’d probably have a default.aspx page with About, Contact, Products folders and any nested pages/folders within. I suppose I’m trying to figure out how I’d do this in MVC?

  • 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-31T14:17:22+00:00Added an answer on May 31, 2026 at 2:17 pm

    I would have an AboutController, a ContactController, a ProductController as you mention

    The AboutController could have an Action Person.

    Set up a route in global.asax as follows:

            routes.MapRoute(
                "AboutPerson", // Route name
                "about/board/{personName}", // URL with parameters
                new { controller = "About", action = "Person"} 
            );
    

    the Person action should look like this:

        public ActionResult Person(string personName) {
             // Code to get person data from DB - if required
             var person = db.GetPerson(personName);
             return View(person);
    }
    

    If the pages are static, just have different views and check the personName and return the relevant view: e.g.

    return View("BoardMember1");
    

    Where BoardMember1.cshtml / aspx is a View within the Views/About Directory

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

Sidebar

Related Questions

I am reading a book about Javascript and jQuery and using one of the
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm making a simple page using Google Maps API 3. My first. One marker
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

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.