One of my blog readers Robert asked me a question. Is it possible to create a counter field or an auto-generated Row Number in an ASP.NET ListView.
The solution is to add <%# Container.DataItemIndex + 1 %> to the ItemTemplate of the ListView as shown below:
The output with the auto generated serial number/row number is as shown below:
If you are working with the ASP.NET GridView, check this post of mine ASP.NET GridView Tips and Tricks series
Will you give this article a +1 ? Thanks in advance