How to get the current Item index from a databound ListView
You can use <%# Container.DisplayIndex %> to get your position in the current list. You can use Items.Count on the Control to get the total Item... »
You can use <%# Container.DisplayIndex %> to get your position in the current list. You can use Items.Count on the Control to get the total Item... »
I’m posting this blog mostly to remind myself how to fix this if ever I run into it again, but if anyone else benefits from it,... »
Wrap your Eval call: Markup: <asp:LinkButton id=”whatever” runat=”server” Visible=’’<%# ShowHideLink(Eval(“Storage”)) %> Code-Behind: protected bool ShowHideLink(object obj) { bool result = false; //cast obj to whatever datatype... »