How do i strip down a string to just show a user name in Active directory
-
I have a app that list users that are locked out but it shows this in my combobox billy-Noel Schmitlin,OU=Quality-Labo,OU=Users,OU=Soultz,DC=jacob-wonder,DC=com i just want it to show "Billy-Noel" just the users name what i have searched removes the CN= but thats it
strName = strName.Remove(0, 3);
Thank you for your time. -
I have a app that list users that are locked out but it shows this in my combobox billy-Noel Schmitlin,OU=Quality-Labo,OU=Users,OU=Soultz,DC=jacob-wonder,DC=com i just want it to show "Billy-Noel" just the users name what i have searched removes the CN= but thats it
strName = strName.Remove(0, 3);
Thank you for your time.Hi, Split() on the first char you don't want, I guess that is a comma. And read up on string class. :)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
-
I have a app that list users that are locked out but it shows this in my combobox billy-Noel Schmitlin,OU=Quality-Labo,OU=Users,OU=Soultz,DC=jacob-wonder,DC=com i just want it to show "Billy-Noel" just the users name what i have searched removes the CN= but thats it
strName = strName.Remove(0, 3);
Thank you for your time.or you could try: int i = yourString.IndexOf(","); string s = yourString.SubString(0,i);
-
Hi, Split() on the first char you don't want, I guess that is a comma. And read up on string class. :)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
Some mupet-numb-nuts gave you onesy, so I've dropped a five on top to make it better.
Panic, Chaos, Destruction. My work here is done.
-
Some mupet-numb-nuts gave you onesy, so I've dropped a five on top to make it better.
Panic, Chaos, Destruction. My work here is done.
:thumbsup:
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
-
or you could try: int i = yourString.IndexOf(","); string s = yourString.SubString(0,i);
Thanks for the help ill give that a go. -Summey