Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

strange asp goings on

Status
Not open for further replies.

anyideas

Programmer
May 2, 2002
127
GB
hey all.

I've got a textarea on an asp page, it's contents get saved to an sql 7 table.

In another asp page the contents get displayed (uses xml & xsl to render).

If I enter "abc" on the same line then it all works fine. However, if in the textarea i write:

a
b
c

(pressing enter after each character)
in sql it gets stored as:

a
b
c

but gets displays as "a b c" in the asp.

Has anyone got any ideas as to why and how to get around it?

Cheers

Mark
 
when you pull the content from the database, do this:
Code:
Replace(db contents, vbcrlf,&quot;<BR>&quot;)
This will replace all the line breaks in the database content with valid HTML line breaks for use in your ASP.

hope this helps

Tony
 
Great idea, but...

It came out looking like &quot;a <br> b <br> c&quot; - not quite the ideal solution but lots of thanks for trying!!

It's because it's not doing a response.write(variable), but being rendered by xml,xsl.

I need to try and do the same to the value of <xsl:value-of select=&quot;Notes&quot;/>.

Thanks for trying again

Mark
 
Not in a position to tinker with XSL at the moment, but what about the (from memory) output attribute ?
(Hang on I'll go look it up)
<xsl:eek:utput method=&quot;html&quot; />
What's it currently set to ?
Not sure, but it may make a difference. codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
<insert witticism here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top