How to decode strings encoded with HTMLEncode

How to decode strings encoded with HTMLEncode

Post by Rob Robert » Fri, 03 Jun 2005 03:38:41


I have some input fields on an asp page that get populated from fields in a
database. The user can edit the fields, and when the form is submitted the
database fields are updated with the new values.

Some of these fields may contain quote marks. When populating the input
fields from the database, I can use the Server.HTMLEncode method to prevent
HTML errors caused by the quotes. But there doesn't seem to be an
equivalent Server.HTMLDecode method.

How can I decode the values of the input fields so that the values written
to the database contain the actual quote marks instead of the encoded
version (")?

Thanks in advance,
--Rob Roberts
 
 
 

How to decode strings encoded with HTMLEncode

Post by Rob Robert » Fri, 03 Jun 2005 04:31:00

Uh, never mind on this one. HTMLEncode was the wrong approach to the
problem in the first place.

--Rob Roberts