Solved

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

Posted on 2010-09-04
4
228 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
  • 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 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

15 Experts available now in Live!

Get 1:1 Help Now