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 604641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:03:37+00:00 2026-05-13T17:03:37+00:00

I have recently started to examine ASP.NET MVC. I have studied quite a few

  • 0

I have recently started to examine ASP.NET MVC. I have studied quite a few examples and common to these are that they contain quite simple scenarios, where a view will map to either an instance of a type in the model or a list of a paritcular type from the model.

I’m looking for guidelines to compose/composite views. In the long term I would like Ajax to be part of the equation, but for now I’m looking for a simpler non Ajax setup.

The problem

Here is a description of a contrieved problem. A domain model contains the types A and B.

class A
{ String ID, String Name, int Age
  List<B> ListOfB
}

class B
{ String ID, String Name, String Url}

I would like to have a that allows the following:

  • A DropDownList showing type A information
  • Details about the particular A picked in the dropdown
  • A list showing type B‘s related to the selected type A
  • A form that makes it possible to edit the data of a selected type A
  • A form that enables the user to add a new B.

The view should not show all of this at once, instead it has to show different combinations of information and functionality according to user input. Combinations of detail and functionality could forexample be:

  1. Initially only show the dropdownlist containing A‘s
  2. If an A has been selected in the dropdown:
    • Show the particular A as selected in the dropdown
    • Show detail info about the selected A
    • Show list of detail info of related type B‘s
  3. The user wants to edit a particular A
    • Show the particular A as selected in the dropdown
    • Show form that allows user to edit particular A
    • Show list of detail info of related type B‘s
  4. The user wants to add a new B
    • Show the particular A as selected in the dropdown
    • Show detail info about the selected A
    • Show list of detail info of related type B‘s

That could look something like this (used the web version of balsamiq mockups – what a fantastic invention!):

Combination 2:
combination 2 mockup

Combination 4:
combination 4 mockup

Creating the view and controller

Since the solution has to allow for different combinations of data and functionality, I think it would be smart to have a parent view (not to be confused with a masterpage) that contained placeholders for parital views. Then, the parent views controller could make up the right combinations of model data and partial views and feed these to the parent view.

Finally; the questions:

  • Is my way of thinking in accordance with the asp.net mvc methodology?

  • Can you explain/show (not necessarily all of it) how the controller can compile the right combination of partial views and feed these to the parent view?

  • Can you point me towards an Ajax based solution?

  • Can you suggest books/links that contain examples of complex views?

  • 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-13T17:03:37+00:00Added an answer on May 13, 2026 at 5:03 pm

    asp.net mvc fully supports all of your requirements but there are few things you should get up to speed on:

    1. You should look at implementing view models to help seperate your domain model from your specific views. Here is a good link on how to start this.

    2. You need to get up to speed with a client side javascript framework for the ajax work with partial html rendering. jquery will do this or ms ajax. Here is an example

    To your detailed questions:

    Is my way of thinking in accordance with the asp.net mvc methodology?

    Asp.net mvc is not going to constrain you at all so essentially this is fully supported

    Can you explain/show (not necessarily all of it) how the controller can compile the right combination of partial views and feed these to the parent view?

    You can use partial views if you want to seperate bits of code out and can easily refresh them by loading them independently using ms ajax or jquery. You would have a controller that mapped onto your parent view and can delegate and refresh partial views in ajax calls.

    Can you point me towards an Ajax based solution?

    jquery will do this or ms ajax. Here is an example

    Can you suggest books/links that contain examples of complex views?

    This link talks a lot about this.

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

Sidebar

Related Questions

I have recently started a personal project that uses ASP.NET MVC (RC1 at the
I have recently started using ASP.Net MVC 3 RC 2 and have attempted to
I have recently started implementing OAuth in an ASP.Net MVC 4 project. I have
I have recently started teaching myself C# and Asp.net. I am trying to build
I have recently started to learn Objective-C and write my tests using OCUnit that
I have recently started following the examples from The Little Schemer and when trying
I have recently started using coffeescript with Rails and I am finding that sometimes
I have recently started using Google Webmaster Tools . I was quite surprised to
We have recently started using ImageResizer.Net over GDI+ for dynamically resizing images on our
I have recently started using generics in java, and in that attempt tried to

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.