This is more of a supporting answer to the original OP question. I had a terrible time figuring out how to get the index number (serial number in OP) of the line generated by R.Ilayaraja's answer (which BTW worked great).
In your code, page by page, if you want to get the index line number, you can use code similar to this:
Int32 idNumber = Convert.ToInt32(gvlisting.Rows[i].DataItemIndex.ToString()) + 1;
It is assumed that you used the "i" iterator to get other values ββfrom your rows, and you need to add them to the number, since the index is ordinal (index 0 is the first row). If you are not using an iterator, just use .Rows[0]
I tried my best as an ASP.NET nugget to figure it out, so I decided that I would publish it in the hope that it would help someone else like me.
delliottg
source share