Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 236
  • 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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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