Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

ASP + MSAccess + Escape Characters

All,

This may be simple but I'm have a hard time - I have an ASP based website with a simple MS Database. In the database, I have a book title field in which one book is called A & B.

When the ASP tries to render the data, the page won't display. I've tried in the HEAD:

<script language="javascript1.2" runat=server>
function to_html(s_string){
to_html = Replace(to_html, "&", "&")}
</script>

and in the BODY at the database call:

Function to_html(s_string)
to_html = Replace(to_html, " & ", "&")
End Function

I've even tried to replace the A & B in the access database with A & B to no affect.

Each to no affect. Any thoughts?
Thanks for your help!
Craig
[793 byte] By [c_b_2] at [2007-11-11 10:22:01]
# 1 Re: ASP + MSAccess + Escape Characters
Try:

<%= Server.HTMLEncode("A & B") %>
Phil Weber at 2007-11-11 23:12:00 >