Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   how to execute and capture .aspx output (http://www.velocityreviews.com/forums/t117173-how-to-execute-and-capture-aspx-output.html)

John Mott 01-11-2006 04:46 PM

how to execute and capture .aspx output
 
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



=?Utf-8?B?SGF2YWdhbg==?= 01-11-2006 05:33 PM

RE: how to execute and capture .aspx output
 
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


"John Mott" wrote:

> 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
>
>
>


=?Utf-8?B?SGF2YWdhbg==?= 01-11-2006 08:07 PM

RE: how to execute and capture .aspx output
 
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()



"John Mott" wrote:

> 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
>
>
>



All times are GMT. The time now is 03:57 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.