Solved

how would i replace  a word or part of a word in a label containing a few paragraphs or text

Posted on 2013-01-28
2
271 Views
Last Modified: 2013-01-28
I would like to be able to replace word, or parts of words, submitted in a text box before uploading.  How it works now, is they type in the information and hit submit, in a label below the TextBox, it shows what they typed, and how it will look. Then a button become visible for them to continue.  What i would like to do is parse through what they typed and replace or delete unexceptionable words or parts of word.  I know this can be done, but don't know how.

Thanks.

BTW  It's in  c#
0
Comment
Question by:bmanmike39
2 Comments
 
LVL 6

Accepted Solution

by:
nickinthooz earned 300 total points
ID: 38829628
use the .replace to replace the text
string myString = TextBox1.Text.ToString();  
        string replaceString = myString.Replace("oldtext","newtext"); 

Open in new window

0
 
LVL 23

Assisted Solution

by:Michael74
Michael74 earned 200 total points
ID: 38829680
To remove or replace words from the string you will need to determine what needs to be replaced and this could prove problematic as you would need access to a dictionary to identify non-word strings and a listing of all invalid/reserved words

Michael
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now