954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Automatic generation of ID

Hi, I want to generate Candidate ID automatically in C# at the time of creation of user a/c or training id as wat is included in my project...let anyone know me the source code of it...

Abhishek_Boga
Newbie Poster
20 posts since Feb 2009
Reputation Points: 9
Solved Threads: 0
 

declare variables
string y="ID/";
int x;string g
public void generate()
{
g=y+convert.Tostring(x);
x++
}
then call that method in the event where u want it perfomed

kasozi
Newbie Poster
1 post since Sep 2008
Reputation Points: 10
Solved Threads: 0
 

Typically when generating an ID you let the DBMS where records are being stored determine the ID, and after inserting the record you fetch the identity value. If you want to generate a unique ID in an application at runtime use System.Guid.

string id = System.Guid.NewGuid().ToString();
sknake
Industrious Poster
4,954 posts since Feb 2009
Reputation Points: 1,764
Solved Threads: 735
 

Hi, Can anyone send me the link for windows based form .Net

Its really urgent...

Abhishek_Boga
Newbie Poster
20 posts since Feb 2009
Reputation Points: 9
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You