Click here to Skip to main content
11,641,222 members (61,650 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
I have created a employee form and now i what i want to do is that whenever a new employee will come to fill the form the new id which is autogenerated should be displayed in textbox.
can u help me?
Posted 19-Jan-13 16:16pm
Comments
jkirkerx at 20-Jan-13 0:38am
   
Usually HR assigns the employee ID.

Who cares what the ID is until the ID badge is printed.
Nandakishorerao at 21-Jan-13 2:10am
   
it is a webapplication then..you wont be able to know when the other user is going to fill form..therefore maintain a seperate column for storing GUID as guided by Tharaka.
Because, it is totaly irrevalent to show id before inserting...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Show Auto Generation ID after creating EmployeeDetails ,return the value and show.while filling the form time itself u get auto ID means---it makes auto Id repeat...Other users working in same UI means auto id will repeat...
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

select MAX(id)+1 from Tablename

use this for getting ID
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

How about using GUID
you can create the unique idusing GUID easily.
http://www.techrepublic.com/article/generating-and-working-with-guids-in-net/5708732[^]
  Permalink  

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

  Print Answers RSS
0 Mika Wendelius 400
1 OriginalGriff 205
2 DamithSL 203
3 CPallini 185
4 Afzaal Ahmad Zeeshan 129
0 Mika Wendelius 400
1 OriginalGriff 205
2 DamithSL 203
3 CPallini 185
4 Afzaal Ahmad Zeeshan 129


Advertise | Privacy | Mobile
Web01 | 2.8.150731.1 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2015
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