Problem retrieving HTML from database using .NET webservice

Posted on 2003-03-25
Medium Priority
Last Modified: 2010-04-07
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 !
Question by:Silvey
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 33

Expert Comment

ID: 8203666
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?

Author Comment

ID: 8203684
I'm using ASP .NET, an ASP .NET webservice, SQL Server 7.0, and Javascript.  Thanks!
LVL 33

Expert Comment

ID: 8203990
Sorry, I'm not familiar enough with .NET
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.


Expert Comment

ID: 8211195
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.

Expert Comment

ID: 8211206
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.

Expert Comment

ID: 8214013
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.

E-E Admin

Accepted Solution

Mindphaser earned 0 total points
ID: 8264237
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **

Featured Post

Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question