Click here to Skip to main content
11,920,353 members (56,743 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
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
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" */

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

  Print Answers RSS
0 OriginalGriff 415
1 phil.o 170
2 Dave Kreskowiak 155
4 F-ES Sitecore 130
0 OriginalGriff 6,778
1 KrunalRohit 4,495
2 Sergey Alexandrovich Kryukov 3,203
3 George Jonsson 2,805
4 Suvendu Shekhar Giri 2,181

Advertise | Privacy | Mobile
Web02 | 2.8.151120.1 | Last Updated 31 Jul 2012
Copyright © CodeProject, 1999-2015
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