473,513 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ouput HTML to TextArea

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 &lt;br&gt;. 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

Jul 21 '05 #1
0 705

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
20925
by: Mark | last post by:
I have found many examples of how to access an HTML text field from PHP, but cannot find the reverse - how to load an HTML form from a MySQL database. Specifically, I have an HTML form which...
12
2533
by: Phil Powell | last post by:
The customer made a wild request: they want on their admin panel a textarea that will display an existing resume. This textarea, however, must have a dynamic width, one that "fills the screen...
4
2818
by: google | last post by:
I would like to print a table, using a while loop to insert as many blank text fields as players specified by the user. How do I put html inside a php loop. This is what I have.... <body>...
4
14673
by: megha | last post by:
Hi all I am adding signature in textarea which is stored as text in database now if i add html tags to it and later retrieve it in textarea it shows all tags of html but not their function. How...
5
24707
by: Richard | last post by:
I am filling a TEXTAREA with text and links from a database. I need to display the <a href....> code in the TEXTAREA as a clickable link with _blank targetting. I realise I could simply use a TD...
4
4880
by: Newbie | last post by:
How would I modify this form to encode *all* the characters in the 'source' textarea to the '%xx' format & place result code into the 'output' textarea? (cross browser compatable) Any help is...
0
751
by: Ed Swartz | last post by:
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...
6
1635
by: SRafiq | last post by:
Hi I need help with a topic I have an html page and in it i have a textarea which can have a multiple of info, is there any possible way that i can out put a specific area of the textarea using...
5
2219
by: Schraalhans Keukenmeester | last post by:
I want to build a very basic online text editor, to allow customers to modify their own sites' html content using a simple form with textarea element. I read the HTML file like so: <?PHP ...
0
7391
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7553
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7120
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5697
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4754
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3235
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1609
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.