Problem retrieving HTML from database using .NET webservice

I'm storing HTML pages in a database and retrieving to display in a table.  I'm using a webservice to save/retrieve the data.  The webservice does not like some of the characters in the HTML, so I am using the ESCAPE function in the javascript that saves the HTML to the database, then doing an UNESCAPE to retrieve the data.  The problem is, on the UNESCAPE, my retrieved data (HTML) now has boxes in it and the table will not display the code - I receive an HTML error.  I believe these characters are carriage returns or possibly tabs of some sort, but nonetheless, they are being identified in the unescape.  Has anyone else run into this problem?  Has anyone else ever saved HTML and tried to retrieve it using a webservice?  Thanks !
SilveyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shalom CarmelCTOCommented:
Can you please provide some more details on your setup?
What web server?
What application server?
What language on the server side?
What database?
Do you mean web service or CGI?
0
SilveyAuthor Commented:
I'm using ASP .NET, an ASP .NET webservice, SQL Server 7.0, and Javascript.  Thanks!
0
Shalom CarmelCTOCommented:
Sorry, I'm not familiar enough with .NET
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

a1programmerCommented:
Suppose you were tyring to insert  

hello my "name" is 'Silvey'.  I'm 22 years old.

I wouldn't mess with the javascript excaping and unescaping.

To insert certain characters with asp, you simply double the character. '  becomes ''  " becomes "", etc.

dim text
text = "hello my ""name"" is ''Silvey''. I''m 22 years old."

sql would be  hello my "name" is 'Silvey'. I'm 22 years old.
0
a1programmerCommented:
or sql = "insert into code <html><body><table border=""1"" cellpadding=""0"" cellpadding=""0""><tr><td></td></tr></table></body></html>


b.t.w. those are single quotes around Silvey  ' , the ' ' looks like " when they are together.
0
Computer101Commented:
A request for deletion has been made.  If no response or you feel this is in error, comment.  If no objection, I will delete in three days.

Computer101
E-E Admin
0
MindphaserCommented:
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.