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
270 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
Comment Utility
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
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 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

12 Experts available now in Live!

Get 1:1 Help Now