code for unique indentification number in mailing using c#.net

Posted by Gayathrirachu under C# on 2/8/2011 | Points: 10 | Views : 2417 | Status : [Member] | Replies : 5
good morning,

can anyone suggest me how to generate unique id in c#.net

i have created a page and im submitting that page in mail but here i have to get unique no like (unique registration no)




Responses

Posted by: Naimishforu on: 2/8/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Please check this out :

http://www.dotnetfunda.com/codes/code1250-generate-unique-id-in-csharpnet-.aspx

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Gayathrirachu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Prabhakar on: 2/8/2011 [Member] [MVP] Starter | Points: 25

Up
0
Down
Hi Naimishforu


i think here is some think probs .. this link not working .. please check it ...

Best Regard's
Prabhakar

Gayathrirachu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 2/8/2011 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi Prabhakar,

Ya, The link has been deleted by this forum cause it has found similar post somewhere else.

I'm posting the code below :

   private string GenerateRandomCode()

{
string s = "";
Random objrand = new Random();
char[] arr = "abcdefghijklmnopqrstuvwxyz".ToCharArray();
for (int i = 0; i < 3; i++)
{
s = s + arr[objrand.Next(26)].ToString() + objrand.Next(10).ToString();
}
return s;
}


Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Gayathrirachu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jish on: 3/19/2012 [Member] Starter | Points: 25

Up
0
Down
Thanku so much Naimish.... its realy helped me.

Gayathrirachu, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naimishforu on: 3/19/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
You're welcome!!

Thanks,
Naimish
http://dotnetinterview.zxq.net/
http://naimishpandya.blogspot.in/

Gayathrirachu, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response