Usually I would do this to display the data:
<%# Eval("string") %> This would work if the datasource was not an array of type string.
Since there is no expression for the Eval method. How should I display the data?
aspx
<ItemTemplate>
<%# Eval("") %>
</ItemTemplate>
codebehind:
string[] images = Directory.GetFiles(UploadsPath);
lvSlideShow.DataSource = images;
lvSlideShow.DataBind();
Just use Container.DataItem. It is pointing at the current thing in the IEnumerable object being bound to.:
<ItemTemplate>
<%# Container.DataItem %>
</ItemTemplate>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With