How can I access a data repeater's item by index instead of explicit name?
Right now I'm using the following code in my markup:
<asp:Hi开发者_StackOverflow社区ddenField ID="TheName" runat="server" Value=<%#Eval("SpeakerName")%> />
I would like to use:
<asp:HiddenField ID="TheName" runat="server" Value=<%#Eval(0)%> />
I would like to be able to call it by index instead of explicitly by "SpeakerName". Is there a way to do this in ASP.NET 4.0?
Try this:
<asp:HiddenField ID="TheName" runat="server" Value=<%# Eval("[0]") %> />
精彩评论