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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:19:39+00:00 2026-06-17T23:19:39+00:00

I am terribly confused with MVC. I don’t have any code to show because

  • 0

I am terribly confused with MVC.

I don’t have any code to show because i don’t know how to do it.

I have an object

public class Name()
{
  String name="balh"
  String something="blah blah"
  //this object works fine and doesn't look like this it has the appropriate get;set;
  //use this as just an example
  //please disregard this format
} 

Now i have a

List<Name> list;//this just holds all of my objects

I need them to be passed to the View

I keep seeing something about models but i don’t see it declared anywhere

How do i loop in the view to create something like this

<div> object1 string</div>
<div> object2 string</div>
<div> object3 string</div>
<div> object4 string</div>
<div> object5 string</div>
  • 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-06-17T23:19:40+00:00Added an answer on June 17, 2026 at 11:19 pm

    Your view would look like this, assuming you use your list as the model:

    @model List<Name>
    
    @foreach(var item in Model) {
      <div> @item.name @item.something</div>
    }
    

    So your controller action method might be:

    public ViewResult Index() {
      // Somehow build list which is List<Name>
      return View(list);
    }
    

    EDIT: You seem very new, so I recommend trying this tutorial: http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/intro-to-aspnet-mvc-3

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

Sidebar

Related Questions

I am not terribly familiar with either tech, so bear with me. I have
After looking around (for not terribly long I have to admit) I wonder if
I have an old database (with terribly named tables and columns) and an entity
I'm terribly new to MVC and programming in general, and I'm having trouble loading
I have a WEB Application. I was asked to Call a Class (Service) inside
Not a terribly good question, sorry. I have a program that needs to be
I really like processing XML with e4x, any other method I just get confused
I have a WCF service with a security class for getting some of the
I have inherited a terribly written MS Access database that I need to import
I'm terribly confused on how I should be writing this function...it basically scores a

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.