Link to home
Start Free TrialLog in
Avatar of Justin
JustinFlag 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
Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Justin


Thank you, that did it