This is a little complicated to explain so will try my best.
I have a multiline textbox where the user can enter text. This text is then written to file via StreamWriter. The problem is if the user enters a new line in the text box this newline is carried forward to the target file with the rest of text. However this text is then inserted into code and because the browser doesnt recognise blank space the newlines at shown on the target page and causes formatting errors within the code.
What I need is to be able to replace the newlines with <br /> before I it is streamed to the target file.
I am currently using:
TextBox1.Text.Replace(Environment.Newline, "<br />")
This has always worked for me previously when dealing with multiline text but for some reason it isn't working here. The text has no line breaks when viewed in the browser and code shows the new lines and white space rather being changed to <br /> as it sho ...
Go to the complete details ...