Displaying Response Stream in a Browser

  • Thread starter Thread starter MC
  • Start date Start date
M

MC

Suppose I wish to do a programmatic POST. Is it possible to display
the response in a browser? I also want to keep the same session as
was made with the POST. All I can think of is to first save the
response stream to a file but I don't like that idea, partly because I
lose the session.

Thanks for any input,
Craig
 
Thus wrote MC,
Suppose I wish to do a programmatic POST. Is it possible to display
the response in a browser? I also want to keep the same session as
was made with the POST. All I can think of is to first save the
response stream to a file but I don't like that idea, partly because I
lose the session.

Instead of trying to orchestrate a WebRequest and a browser instance, I'd
rather use the WebBrowser control here.

Cheers,
 
I'm not sure what is the problem. You can always stream the response you get
from the request to the browser and I don't see how using a file (which you
don't need to use) ) would have something to do with sessions...

Or is this sometying you want to do in a Windows application rather than in
an ASP.NET application ?
 
Yes, the original idea was for a Windows application, though maybe I
could do it in ASP.NET. How would that work? I'm still getting used
to ASP.NET and web programming.

Craig
 
Thus wrote Joerg,
Thus wrote MC,

Instead of trying to orchestrate a WebRequest and a browser instance,
I'd rather use the WebBrowser control here.

Ouch,

didn't bother to realize that you've posted this to an ASP.NET group ;-)

In that case you can simply dump the HttpWebResponse to your page's or HttpHandler's
output stream.

Cheers,
 
In a Windows application, it would be likely simpler to just use the
webbrowser control as suggested by Joerg.

In an ASP.NET application, the server side page is able to post to another
third party web server and stream directly the response from that third
party server to the browser requesting the page that does the call...

It looks like you need to clarify first what you are trying to do from a
higher level view (and especially making sure if you go for a web or a
windows application)....
 
I'll try this, thanks.

Thus wrote Joerg,


Ouch,

didn't bother to realize that you've posted this to an ASP.NET group ;-)

In that case you can simply dump the HttpWebResponse to your page's or HttpHandler's
output stream.

Cheers,
 
Back
Top