Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to Auto Generate Serial No in List View in C#.Net
Posted
Comments
Maciej Los 11-Feb-13 7:56am    
Please, be more specific and provide more details, examples!!! What you mean serial number?
OriginalGriff 11-Feb-13 7:57am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.
bbirajdar 11-Feb-13 8:21am    
Mr. Chennai..Is this Winforms or ASP.NET question?

1 solution

The solution is to add
HTML
<%# Container.DataItemIndex + 1 %>
to the ItemTemplate of the ListView
 
Share this answer
 
v2
Comments
Maciej Los 11-Feb-13 8:17am    
This is ASP.NET code. Do you see "ASP.NET" tag?
bbirajdar 11-Feb-13 8:21am    
Oh right.. Let me check this with OP before deleting my solution
Maciej Los 11-Feb-13 8:25am    
Decision belongs to you ;) but i suggest to delete this solution to avoid down-voting.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900