Click here to Skip to main content
12,628,919 members (34,603 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# Word Text
I have search this in Google but not exactly solution of my problems.
Posted 20-Feb-12 20:05pm
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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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" */
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161205.3 | Last Updated 31 Jul 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100