PDA

View Full Version : Replacing Tags


mr_ego
08-25-2002, 09:44 AM
I want to relace the standard < tag with &amp;lt; so that im stripping the html out of a file and returning it as a text document.

How do i do this?

Mr_Ego :thumbsup:

smeagol
08-25-2002, 04:42 PM
Mr Ego,

To replace a character in a String, all you need to do is:

WhateverString = Replace(WhateverString, "<", "&lt;")

You'll also need to replace the > with "&gt;".

Hope this helps.

Smeagol
http://www.javascriptsolutions.com

oracleguy
08-25-2002, 06:14 PM
Or you could use:

Server.HTMLEncode "<p>your text</p>"