Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / September 2004

Tip: Looking for answers? Try searching our database.

Returning plain HTML from a web service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Bardon - 23 Sep 2004 21:09 GMT
I have a web service that I need to return HTML code, and I can't seem
to get rid of the XML tags that surround it.  Right now I'm just
writing the HTML into a return string, and am getting something like
this:

<?xml version="1.0" encoding="utf-8" ?>
<string xmlns="http://HTMLSERVICE.com"><html><h3>Loaded..</h3></html></string>

Ideally, I'd like to strip out the XML tags and be able to return just

<html><h3>Loaded..</h3></html>

to the browser.  I've tried digging into the HTTP application handlers
(EndRequest etc), but I can't seem to find the correct location/event
to intercept the response before my service returns.  Is there a way
to get this type of return from a web service method?
csharpcomputing.com - 24 Sep 2004 19:33 GMT
Return data from an XML web service is always enclosed in XML. If you would
like to get an HTML page from the web server, try using ASP.NET web
application instead of XML web service.
Aleksey Nudelman
http://csharpcomputing.com

> I have a web service that I need to return HTML code, and I can't seem
> to get rid of the XML tags that surround it.  Right now I'm just
[quoted text clipped - 12 lines]
> to intercept the response before my service returns.  Is there a way
> to get this type of return from a web service method?
John Bailo - 24 Sep 2004 20:33 GMT
> Return data from an XML web service is always enclosed in XML. If you
> would like to get an HTML page from the web server, try using ASP.NET web
> application instead of XML web service.

You could build a browser component that consumes the service and displays
the resulting string as HTML....

> Aleksey Nudelman
> http://csharpcomputing.com
[quoted text clipped - 16 lines]
>> to intercept the response before my service returns.  Is there a way
>> to get this type of return from a web service method?

Signature

http://www.texeme.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.