views:

12

answers:

1

I have some code like this:

<div><%# DataBinder.Eval(Container.DataItem, "M_ClassProperty") %></div>
<img src='<%# DataBinder.Eval(Container.DataItem, "M_AnotherClassProperty").To<string>()  %>'

but there is no component which wraps this code like Repeater, DataList or something like that. How can set the set a DataItem to this code to show the values of an object of a class.

I hope i could tell clear (I don't think so but I HOPE :)

+1  A: 

You can use normal inline code, like this:

<div> <%= SomeObject.SomeProperty.ToString() %></div>

To get an object, you can define a protected property in the code-behind page.

SLaks
Thank you. I felt myself very stupid. :s
uzay95