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!

Help Decoding Server.HTMLEncode HTML

Status
Not open for further replies.

gus121

Technical User
May 9, 2002
298
GB
Hi I have managed to update the HTML in the databse in Encoded Format to my database using the Server.HTMLEncode method. Is there any way of decoding it back to how it was?

Please Help.

Angus
 
This should do it...

Code:
	Function StringConvert(strHTML)
		Dim strOutput	
					strOutput = Replace(strHTML, &quot;&lt;&quot;, &quot;<&quot;)
					strOutput = Replace(strOutput, &quot;&gt;&quot;, &quot;>&quot;)
					StringConvert = strOutput 
		End Function

Response.Write(StringConvert(strTEXT))

www.vzio.com
ASP WEB DEVELOPMENT
 
well hmm... you must change the first instance of &quot;<&quot; with the &-l-t-; and the second replace first instance of > with &-g-t-; without the dashes(-) because i can't post it here.

www.vzio.com
ASP WEB DEVELOPMENT
 
Clarkin, I did put it inside
Code:
 but < doesnt display inside or outside that tag

                        [b]www.vzio.com[/b]
                    ASP WEB DEVELOPMENT
 
thanks all I found the example on pscake.com shortly after submiting this thread. A good site that one

thanks

Angus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top