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!

Displaying memo field containing VBscript tags

Status
Not open for further replies.

RobJDB

Programmer
May 13, 2002
44
GB
I have a memo field in my Access db, and it contains the <% ... %> tags within a load of other text. If I display the field within a text box, the tags show just like they should, but if I display it straight on a page, the <% ... %> bits are ignored (or processed?). Does anyone know how to get around this? Forums like this obviously contain loads of memo fields packed with such tags, so it must be possible.

Thanks,

Rob
 
Use Server.HtmlEncode(myString)

Dim str
str = &quot;<b>this is bold text</b>&quot;
Response.Write str

str = Server.HtmlEncode(str)
Response.Write str
 
My guess would be thsat the browser is seeing everything between the
Code:
<%...%>
as a tag, not recognizing it, and simply not displaying it, similar to the way older browser ignore unknown attributes. Try doing replaces with lt and gt escapes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top