DataList, ArrayList DataBinder.Eval

  • Thread starter morisse caglis via .NET 247
  • Start date
M

morisse caglis via .NET 247

Hi,
I would like to list out all files in 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")%>

Any idea...

Thanks
 
P

Peter Rilling

You don't need to specify the class name (CFileInfo). Just specify the
objects property.


morisse caglis via .NET 247 said:
Hi,
I would like to list out all files in 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top