Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
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.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

930 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