473,327 Members | 1,997 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

store text as html and vice versa

Hi Guyz,

I am saving the content of a text box into a memo field field in my
database. Unfortunately, I need to output this field as html which means my
carriage returns are ignored by the browser. Using <pre> isn't appropriate
so I plan on encoding text as it goes into (and comes out of the database)
i.e replace carriage returns with <br>. Whats the most efficient way to do
this? Or can you think of a better way?

Thank :) Peter
Jul 21 '05 #1
2 1031
Thanks for that. I've used the XmlWriter already so I should have guessed
that there would be one for html too .. doh! Will let you know how I get on.
:)
"Jayson" <an*******@discussions.microsoft.com> wrote in message
news:8C**********************************@microsof t.com...
check out the HtmlTextWriter object, it should contain more than enough

methods/properties/etc to satisfy what you are looking for.
Jul 21 '05 #2
Cor
Hi peter,

Except for the textbox (And I do not know more) all cariage return line
feeds have to be done with <br> there is no code translation for it.
Cor

Thanks for that. I've used the XmlWriter already so I should have guessed
that there would be one for html too .. doh! Will let you know how I get on. :)

Jul 21 '05 #3

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

Similar topics

17
by: Guyon Morée | last post by:
what is the difference? if I open a text file in binary (rb) mode, it doesn't matter... the read() output is the same.
9
by: Jason Gogela | last post by:
Does anyone out there know why I should care whether a <span> is nested in a <p> or vice versa? What is the bennafit of adhering to this standard? It seems to me that regardless of which way you...
2
by: peter x | last post by:
Hi Guyz, I am saving the content of a text box into a memo field field in my database. Unfortunately, I need to output this field as html which means my carriage returns are ignored by the...
0
by: d.steininger | last post by:
Hi there! Is there a way to bind a Textbox.Text to a ScrollBar.Value (not the Textbox-own Scrollbar) and vice versa? The Problem: I have to deal with two controls. The Textbox should accept...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.