tags:

views:

54

answers:

1

I have a dataset that i am binding to a repeater. The GetXML() of the dataset looks like this:

<NewDataSet>
 <Table1>
   <Company.Date>03/22/2009</Company.Date>
  </Table1>
</NewDataSet>

The aspx looks like this:

<%# DataBinder.Eval(Container.DataItem, "Company.Date")%>

When I bind it, I get the error:

System.Data.DataRowView' does not contain a property with the name 'Company'.

It doesn't seem to like the period. Is there a way to fix this without changing the naming convention?

+1  A: 

Use DataBinder.GetPropertyValue(Object, String), it does not evalulate the string but uses it in its exact form to get the value.

Source

Samuel