Silvey
asked on
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 !
ASKER
I'm using ASP .NET, an ASP .NET webservice, SQL Server 7.0, and Javascript. Thanks!
Sorry, I'm not familiar enough with .NET
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.
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.
or sql = "insert into code <html><body><table border=""1"" cellpadding=""0"" cellpadding=""0""><tr><td> </td></tr> </table></ body></htm l>
b.t.w. those are single quotes around Silvey ' , the ' ' looks like " when they are together.
b.t.w. those are single quotes around Silvey ' , the ' ' looks like " when they are together.
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
Computer101
E-E Admin
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What web server?
What application server?
What language on the server side?
What database?
Do you mean web service or CGI?