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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

data with quotes wrecks html/ap table 2

Status
Not open for further replies.

sweetleaf

Programmer
Jan 16, 2001
439
0
0
CA
Hi,
I have an asp which reads data from a database and writes the rows out to a table. some of the database data contains quotes.
it seems that: response.write rs("myfield") doesn't understand or know how to process quotes b/c when quoted data is encountered the table borders go all over the place.
Can anyone help please..

thanks
 
use response.write ( server.htmlencode(rs("myfield")) ) and give a try

 
thanks SrikanthMc!

only thing is now i'm getting "type mismatch htmlencode was not handled" messages - why would that be?
 
Make sure that you're trying to html encode a string, not say a date/time field. Harold Blackorby
hblackorby@scoreinteractive.com
St. Louis, MO
 
What a great help! I was usually writing my own functions to replace spaces with " " and quotes with """. And I didn't get any error messages.
---
---
 
the html table is still going haywire when a quoted piece of data is encountered..
 
Try looking at your HTML code output to see what the problem it. It sounds like it might not be the ASP code that is messing it up. Normally a quote in HTML doesn't cause much problems, especially if it is in a table cell. I'd not look at the ASP code, but look at the HTML code from your browser to see if it gives you a clue what's happening. Harold Blackorby
hblackorby@scoreinteractive.com
St. Louis, MO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top