开发者

How can i set a DataItem to some part of aspx code?

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 Repe开发者_如何学Pythonater, 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 :)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜