Forum Moderators: open

Message Too Old, No Replies

Single Quotes

Handling single quoes in the database field

         

msdn

7:23 pm on Jun 8, 2005 (gmt 0)



I have problem that i need to handle the single quotes which are there in the database in the name field and when am passing those names from asp to style sheet its giving an error ... please help in devloping a script which overrides or we are able to handle he single quote in thename field

Krapulator

4:28 am on Jun 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



post the code you are using to pull the data into the stylesheet.

carguy84

5:28 am on Jun 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



server.htmlencode usually does the trick. Post a code example and it will be easier to help.

john_k

5:52 am on Jun 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you mean your code is creating a CSS style sheet? Or do you mean your ASP is taking data from a database and creating XML that your code is then transforming with an XSLT style sheet?

Try replacing with the ' entity. Otherwise, you need to post more specifics.

[edit]The original version of this reply was way off. I completely misread your question - sorry about that.[/edit]