How to send HLML from a Web Service to a Client Browser

B

Bas Groeneveld

I have an application where I send an XML dataset to a web service to be
rendered as an html page. This complete html page is returned as a string by
the web service.

How can I then pass this string to the client browser to be displayed?

I have had a look at Response.Write, however this does not create a new
page, rather writes into the html from existing aspx page's postback.

I could save the returned html as a file and then redirect the client to
this new html page using Response.Redirect. However this seems clunky and
would not scale all that well in a multi user environment.

I am sure that I have seen an example of this somewhere (using streams from
memory) but I cannot remember where.

Thanks
Bas Groeneveld

--

==========================================
Bas Groeneveld
Benchmark Design System and Software Engineering
PO Box 165N, Ballarat North, VIC 3350
Phone: +61 3 5333 5441 Mob: 0409 954 501



--

==========================================
Bas Groeneveld
Benchmark Design System and Software Engineering
PO Box 165N, Ballarat North, VIC 3350
Phone: +61 3 5333 5441 Mob: 0409 954 501
 
B

Bas Groeneveld

I think I have just solved it myself:

sHTML = MyWebService(sXML);

Response.Write(sHTML);
Response.End();

The End() member will terminate the Response and ensures that the aspx
postback does not append anything else. The client browser than displays the
page defined in sHTML (which has been derived from the data in sXML).

Is this the best way to do this??

Thanks
Bas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,156
Latest member
KetoBurnSupplement
Top