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 count.

Jason Kulatunga

Build Automation & Infrastructure guy @Adobe. I write about, and play with, all sorts of new tech. All opinions are my own.

San Francisco, CA blog.thesparktree.com

Subscribe to Sparktree

Get the latest posts delivered right to your inbox.

or subscribe via RSS with Feedly!