How can I do this

Hello ,
when i create a username,I wanted to do check the username from a Active directory and if the username is exist already then i wanted to create another username by adding an integer. for example.....

first person when he create a username the username will be
dave-1
2nd person
dave-2
when the third person try...the available username should be dave-3

how can I do that in C#? can anybody help me out?

regards,
Thaya

[455 byte] By [Thaya] at [2007-12-22]
# 1

Hi

Are you creating the usernames in SQL / Access database. please specify.

Thanks

Sibusiso at 2007-8-30 > top of Msdn Tech,Visual C#,Visual C# General...
# 2
Thanks Sibusiso,
Active directory is the place where the information stroed as object so i have check the objects where the username exist and then i have to find the appropriate username.I hope you get it now....

regards,
Thaya

Thaya at 2007-8-30 > top of Msdn Tech,Visual C#,Visual C# General...
# 3
Are you having problem checking if a username exist in active directory or are you having problem with the logic of creating a unique username ?
ThE_lOtUs at 2007-8-30 > top of Msdn Tech,Visual C#,Visual C# General...
# 4
Yes...finally i fixed that probleam...thanks guys....Thaya
Thaya at 2007-8-30 > top of Msdn Tech,Visual C#,Visual C# General...