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...

Recommended Answers

All 3 Replies

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

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();

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

Its really urgent...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.