Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
I have search this in Google but not exactly solution of my problems.
Posted
Comments
Varun Sareen 21-Feb-12 1:14am    
Please paste some sample code of yours
krumia 21-Feb-12 1:34am    
Your question is vague.

Do you want to do something like this: Your text box has a text "samplesamplesample" and you just want to change it to "sample".
OriginalGriff 21-Feb-12 2:53am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, read your homework instructions, or read your mind.
Use the "Improve question" widget to edit your question and provide better information.

1 solution

C#
string SearchFor = "Hi";
string ReplaceWith = "Bye";
textbox1.Text = "Hi, this is your textbox string Hi";
textbox1.Text = textbox1.Text.Replace(SearchFor, ReplaceWith);

/* RESULTS: "Bye, this is your textbox string Bye" */
 
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