Click here to Skip to main content
15,905,322 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

First pardon me to repeat almost same kinda question.

but i have to create a new thread bcoz it will helps some in the future.

right now the code is

C#
   if (username.Contains("."))
                {
                    string Fname = username.Substring(0, username.IndexOf("."));
                    Fname = Fname.Replace(" ", "");
                    
                    string[] splitString = username.Split(new char[] { '.' });
                    username = splitString[splitString.Length - 1];


//*****Am trying to write IF statement here like this but need some help to complete this if statement.


              If (search.Filter = "(sn=" + username + ")&(givenname=" + Fname + ")";
			
			search.Filter = "(sn=" + username + ")";


}
Posted
Comments
Sergey Alexandrovich Kryukov 23-Feb-11 19:26pm    
C#.1.0. Hm... Are you serious?
--SA
Orcun Iyigun 23-Feb-11 19:34pm    
http://www.experts-exchange.com/Programming/Languages/C_Sharp/Q_26841033.html so to get this done I think you should force yourself to find a solution cuz seems like till here you havent done anything and other people helped you out...
shan1395 23-Feb-11 19:38pm    
I never claim the credit for that code ,never ever.

1 solution

Thanks for all your comment,figured by myself.used different unique field to retrieve the value.

I would like to delete this question,bcoz i don't think so no point of keep it in the form,its not going to help any one.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900