Click here to Skip to main content
12,299,012 members (51,869 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# C#4.0
How to Auto Generate Serial No in List View in C#.Net
Posted 11-Feb-13 1:45am
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.
aspnet_regiis -i 11-Feb-13 8:21am
   
Mr. Chennai..Is this Winforms or ASP.NET question?

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

The solution is to add
<%# Container.DataItemIndex + 1 %>
to the ItemTemplate of the ListView
  Permalink  
v2
Comments
Maciej Los 11-Feb-13 8:17am
   
This is ASP.NET code. Do you see "ASP.NET" tag?
aspnet_regiis -i 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160525.2 | Last Updated 11 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100