PK.
PK.

Reputation: 45

Best way to display the data from a 2 dimensional array on a ASP.net page

I'm new to ASP.net,C#.

I'm trying to NOT use any database and hence running into issue.

I have a small application that will generate the questions and then stores them along with answers in a 2 dimensional array. At the end, I want to display the contents in a tabular format on the same page.

When I tried to use GridView , it returns an error that the "data source is not a one dimensional array".

What is the best control that allows me to bind the 2D array as the datasource and then displays it on that page.

Upvotes: 0

Views: 812

Answers (1)

bigorangesu
bigorangesu

Reputation: 66

I recommend using datatables instead of arrays. Then use a datagrid.

http://www.issociate.de/board/goto/880762/Binding_Multidimensional_Array_to_DataGrid.html

Upvotes: 2

Related Questions