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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:31:21+00:00 2026-05-24T05:31:21+00:00

How do I display the foolowing in my view? I am having a class

  • 0

How do I display the foolowing in my view?

I am having a class as follows:

public class testArrays()
{ public list<int>ID{get;set;}
public int TotalAccount{get;set;}
public List<int> Account{get;set;}
}
public List<testArrays> test {get;set;}

How can I displat the values of test in my view?  Part of my code is as follows:
foreach(var i in model.test)
{
foreach(var j in i)<-----stuck as from here
{

}

}

  • 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-24T05:31:22+00:00Added an answer on May 24, 2026 at 5:31 am

    Same way you do any nested loop. Unless im missing something?

    foreach(var i in model.test) // i is "testArrays"
    {
        foreach(var x in i.ID) // x is "int"
        {
           // ..
        }
    }
    

    A better way would be to use custom display templates.

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

Sidebar

Related Questions

Having defined a Model public class HomeModel { [Required] [Display(Name = First Name)] public
I have the following entities in Entity Framework: public class School { public int
I am having a List View, all the list items(Text) need be to updated
Say you have the following object: public class Address { public String Line1 {
i am trying to XML serialize a class object but having the following problem:
I was having problems modifying a view inside a thread. I tried to add
Good day everybody, I'm having troubles with the display of a data that does
I am having a hard time solving the following with an MVC view. My
Given that I have the following widget (and a view attached to it): public
I am having an issue with ASP.NET MVC3 client side validation. My view is

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.