Avatar of Justin
Justin
Flag for United States of America asked on

access a single value from list

I am very new to C#, I hope this is a simple question but I have not been able to find the answer, Thank you for any help you are able to provide.

I have a list of items pulled from a database.

public List<ListModel> my List

This is pretty much 3 columns of numbers

Header1 Header 2 Header 3
1               2               2
1               2               2
3               3               1
1               2               3


I would like to place those values into a html table in various cells. I cant build the table in a foreach as the values may need to be spread out in a non repeating manor .

In other languages you could access an array by myArray [1][2] , How can this be done in in a list I am passing from a controller to a view?

Thank you
ASPC#

Avatar of undefined
Last Comment
Justin

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Chris Stanyon

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Justin

ASKER
Thank you, that did it
Your help has saved me hundreds of hours of internet surfing.
fblack61