Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
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
Comments
jkirkerx 20-Jan-13 0:38am    
Usually HR assigns the employee ID.

Who cares what the ID is until the ID badge is printed.
Nandakishore G N 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...

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...
 
Share this answer
 
select MAX(id)+1 from Tablename

use this for getting ID
 
Share this answer
 
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[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900