473,490 Members | 2,472 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

generate serial number automatically in gridview

375 Contributor
A big hello to everyone

I have dropped on a gridview on asp.net coding done is C# 2005.
Here I display the records when a certain condition satisfies.
eg. I want to display the details of all employess who has been employeed between a certain period.
I place the query and do get the results.
eg. there are five records
101 aaa ddd eee
102 bbb ccc ddd
.
.
105 ccc ddd eee

Now I want to display in the first column the serial number.
1 101 aaa ddd eee
2 102 bbb ccc ddd
3 .
4 .
5 105 ccc ddd eee

How do i generate automatically serial numbers.

Thank you
Aug 13 '07 #1
1 5760
cmrhema
375 Contributor
A big hello to everyone

I have dropped on a gridview on asp.net coding done is C# 2005.
Here I display the records when a certain condition satisfies.
eg. I want to display the details of all employess who has been employeed between a certain period.
I place the query and do get the results.
eg. there are five records
101 aaa ddd eee
102 bbb ccc ddd
.
.
105 ccc ddd eee

Now I want to display in the first column the serial number.
1 101 aaa ddd eee
2 102 bbb ccc ddd
3 .
4 .
5 105 ccc ddd eee

How do i generate automatically serial numbers.

Thank you
Solved
its as below
<ItemTemplate><%# Container.DataItemIndex+1 %>
<asp:Label ID="lblSerialNo" runat="server"></asp:Label>
</ItemTemplate>
Aug 13 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

15
9618
by: tom | last post by:
Hi, How do I get the serial number of the harddisk in .NET? I want this to be the same number even if the user has reformatted, so I do not want the volume serial number. Thanx, t
3
3242
by: Stewart Allen | last post by:
Hi there I'm trying to find part serial numbers between 2 numbers. The user selects a part number from a combo box and then enters a range of serial numbers into 2 text boxes and the resulting...
29
3707
by: Lauren Wilson | last post by:
Does anyone know how the following info is extracted from the user's computer by a Front Page form? HTTP User Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107...
8
2450
by: vicky | last post by:
Hello,I met a question when I wrote the program.I want the program can transmit the data frame continuosly through the RS232 when the communication has been interrupted.But I don't know how to...
11
4467
by: Alan Mailer | last post by:
A project I'm working on is going to use VB6 as a front end. The back end is going to be pre-existing MS Access 2002 database tables which already have records in them *but do not have any...
1
4316
by: turtle | last post by:
I need to figure out a way to have a form add new records to a table based on a user defined qty and the last number used in the table for a specific part number. Let me explain better... i have...
6
15422
by: Antonio | last post by:
Hi, I would like to have my users register their name and organization name and submit them through email so that we can generate a product key for them. But we have no idea how to generate a...
3
10832
by: jeenajos | last post by:
Hi all, I need to insert a column in a table as sno but it should generated numbers from 1,2,3,.....It is similar to ms excel's auto number.Tel me a way to do it in SQL Express. Cheers Jeen
3
9173
swarnalaxmi
by: swarnalaxmi | last post by:
to display serial number for rows in gridview
0
7146
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7183
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6852
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7356
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5448
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4878
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4573
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
628
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.