473,776 Members | 1,645 Online
Bytes | Software Development & Data Engineering Community
+ 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 5774
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.DataI temIndex+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
9692
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
3279
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 query should find every machine that has that part number between the serial number range. The problem is that the serial number stored is a text field and the results are not what they should be.
29
3757
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 Firefox/1.0 I only ask because I believe I could use the same info as part of a scheme to generate a unique (or at least less common) serialized id code for the user's computer as part of a software locking and activation system. If I had a DLL...
8
2469
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 write. I don't know how to record.Who can give me hand?Thanks very much!
11
4498
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 AutoNumber* fields in them. Correct me if I'm wrong, but I'm assuming this means that I cannot now alter these existing Access tables and change their primary key to an "AutoNumber" type. If I'm right about this, I need some suggestions as to the...
1
4353
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 table with part numbers for a product. Each part number has a Serial Number starting with 0001 then 0002 etc... What i would like to happen is when an employee comes to a part number that they can automatically create 10 new records of Serial...
6
15453
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 product key something look like Microsoft's product key. In addition, I would like to have the key generated based on their name and company name. Any idea on how to go about doing this using VB.NET? Thanks in advance.
3
10857
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
9204
swarnalaxmi
by: swarnalaxmi | last post by:
to display serial number for rows in gridview
0
9464
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10289
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10120
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10061
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8952
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6722
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5367
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3622
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.