views:

22

answers:

1

Right now I'm using the following code in my markup:

<asp:HiddenField 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?

+2  A: 

Try this:

<asp:HiddenField ID="TheName" runat="server" Value=<%# Eval("[0]") %> />
Andrew Hare
Thanks, that worked.
CowKingDeluxe