I have class Foo
which defines property Id
. Class Bar
inherits from Foo
(class Bar : Foo
).
If I assign a List<Bar>
to Repeater.DataSource
then use Eval("Id")
in the ItemTemplate
, the following exception is thrown:
DataBinding: 'Bar' does not contain a property with the name 'Id'.
Any way around this? Id
is a valid property of Bar, it's just defined on Foo.