🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.aspdotnet.components.using
Article #12

DataList, ArrayList and DataBinder.Eval

#12
From: morisse
Date: Tue, 07 Jun 2005 09:05
21 lines
1749 bytes
Hi,
I would like to list out all files of a directory.
To do that, I created a CFileInfo class with string members (strName, 
strDate, strLength...) and I fill an ArrayList with those object.
It works good, I can get an ArrayList with all CFileInfo objects that 
contain strName, strDate, strLength...

The problem is how to show a member of an object embeded in an ArrayList?

I get an "Exception Details: System.Web.HttpException: DataBinder.Eval: 
'www.adm.ascx.CFileInfo' does not contain a property with the name 
CFileInfo.
" error for this line
<%#DataBinder.Eval(Container.DataItem, "CFileInfo.strName")%>

It's not a problem to do that with a datagrid and a DB, but using an 
ArrayList is a little more difficult for me...

Any idea...

Thanks.
Technical Details
Message-ID: <42a5635d$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!feeder1.cambrium.nl!feed.tweaknews.nl!feeder.ecngs.de!ecngs!feeder2.ecngs.de!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 1f001d,db170c40b81d8bac,start
X-Google-Attributes: gid1f001d,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 07 Jun 2005 11:05:32 +0200
From: morisse <caglis@voila.fr>
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.csharpbuilder.aspdotnet.components.using
Subject: DataList, ArrayList and DataBinder.Eval
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 195.1.19.216
Message-ID: <42a5635d$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1118135133 195.1.19.216 (7 Jun 2005 02:05:33 -0700)
Lines: 21
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!feeder1.cambrium.nl!feed.tweaknews.nl!feeder.ecngs.de!ecngs!feeder2.ecngs.de!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail