• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

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

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
bmanmike39
Asked:
bmanmike39
  • 2
1 Solution
 
HugoHiaslCommented:
Breaks are coded as \r\n

Use Replace("\n","<br/>")
0
 
EspavoCommented:
I do...
TextBox1.Text = SomeText.Replace("<br/>",chr(10))
Espavo
0
 
bmanmike39Author Commented:
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
 
bmanmike39Author Commented:
Thx!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now