I'm sure someone has wanted to do this and asked about it
but I can't seem to find the answer.
My web app reads a long text line with <br>'s that are used
to format the text from a CSV file and stores the text
in a database. When the user selects the appriopriate record
the long text line is retrieved from the DB, a page with a
TextBox TextMode=MultiLine (textarea) is displayed,
and the long line is output to the TextBox;
Description.Text = "very long text line with <br>'s";
The Response object appears to call HtmlEncode
so that all <br>'s are changed to <br>. The string
displays as <br> in the TextBox instead of doing a break
as I expect.
Okay, so I said well I'll write and install a simple filter
to allow the <br>'s through to the browser. Initially
I created a pass-through filter. When I run the app
the <br>'s are still encoded.
Question #1:
When I install a filter like so:
Response.Filter = new ResponseFilter( Response.Filter );
Does this replace the default filter or add my filter?
Question #2: How do you send raw HTML to the TextBox without
it getting encoded?
I suppose I can Replace <br>'s with carriage return,
line feeds (\r\n) but what if I want to use other HTML
tags like <p>, <b>, etc?
Ed