Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

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 !
0
Silvey
Asked:
Silvey
1 Solution
 
shalomcCTOCommented:
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
 
shalomcCTOCommented:
Sorry, I'm not familiar enough with .NET
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
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

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now