Solved

How do you get a textbox to display data with out the html tags

Posted on 2010-09-04
4
231 Views
Last Modified: 2013-12-17
I have a textbox that I want the user to be able to edit the code without the html tags showing.

Is this possible?  When the user created the form I used:

TextBox1.Text.Replace(Environment.NewLine, "<br/>");

For storing the info with line breaks.  Now I want to convert it back for when they edit the info.

Thanks for any help.
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
4 Comments
 
LVL 12

Accepted Solution

by:
HugoHiasl earned 500 total points
ID: 33603613
Breaks are coded as \r\n

Use Replace("\n","<br/>")
0
 
LVL 10

Expert Comment

by:Espavo
ID: 33603739
I do...
TextBox1.Text = SomeText.Replace("<br/>",chr(10))
Espavo
0
 

Author Comment

by:bmanmike39
ID: 33605266
HgoHias  Your code will does nothing when i us it.

Espavo  i get the following error when i use your code

"The name 'chr' does not exist in the current context"

If i put "" around it it charges the br to the chr(10)

0
 

Author Closing Comment

by:bmanmike39
ID: 33605502
Thx!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

749 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