how to execute and capture .aspx output

J

John Mott

Is there a way for a web form to invoke an .aspx page and get its output
using the framework? I suppose i can create a client app and execute the url
but I'm thinking there must be a way to do it with the framework.

thanks,

john
 
G

Guest

Yes, you can use the WebResponse and WebRequest classes in the framework to
request the ASPX page and then capture the HTML output from the Response's
output stream. I don't have the code in front of me, but I can dig it up if
you need it.

Paul
 
G

Guest

Dim webReq as WebRequest
Dim webResp as WebResponse
Dim srResp as StreamReader

webReq = webReq.Create("http://some.url.com/somepage.aspx")
webResp = webReq.GetResponse()
srResp = New StreamReader(webResp.GetResponseStream())

Dim htmlOutput as String = srResp.ReadToEnd()
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top