J
John Spiegel
Hi All,
I'm working on a page that essentially loops through a table with a
DataReader, does stuff then lists the outcomes. It records the outcomes in
an ArrayList.
I'm having trouble defining a DataList that uses the ArrayList as the data
source. Here's what I've got so far:
<aspataList id="dlOutcome" runat-server RepeatColumns=1
RepeatDirection=Vertical>
<ItemTemplate>
<%# DataBinder.Eval( Container.DataItem, alOutcome) %>
</ItemTemplate>
<aspataList>
I get a compilation error of CS0117: 'System.Web.UI.Control' does not
contain a definition for 'DataItem'. The examples I can find all use
variations on pulling data from a table but also indicate that an ArrayList
is also a valid data source. Can anyone see what I'm messing up or
post/direct to an example of using an array list as a data source?
Also on a related topic, can ArrayLists be multidimensional? I'm not seeing
how to do so and would think it would be nice to lay out multiple columns in
a DataList.
TIA,
John
I'm working on a page that essentially loops through a table with a
DataReader, does stuff then lists the outcomes. It records the outcomes in
an ArrayList.
I'm having trouble defining a DataList that uses the ArrayList as the data
source. Here's what I've got so far:
<aspataList id="dlOutcome" runat-server RepeatColumns=1
RepeatDirection=Vertical>
<ItemTemplate>
<%# DataBinder.Eval( Container.DataItem, alOutcome) %>
</ItemTemplate>
<aspataList>
I get a compilation error of CS0117: 'System.Web.UI.Control' does not
contain a definition for 'DataItem'. The examples I can find all use
variations on pulling data from a table but also indicate that an ArrayList
is also a valid data source. Can anyone see what I'm messing up or
post/direct to an example of using an array list as a data source?
Also on a related topic, can ArrayLists be multidimensional? I'm not seeing
how to do so and would think it would be nice to lay out multiple columns in
a DataList.
TIA,
John