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
276 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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:Michael Fowler
Michael Fowler 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

Containers and Docker for Everyone

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

726 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