Re: Current Pages Response Stream

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: vMike (MichZaelY.GeZorgeY_at_noZorY.geZwaYrrenY.com)
Date: 02/06/04


Date: Fri, 6 Feb 2004 11:37:00 -0500

I'm not sure if this will help, but it you want to capture the html string
that is sent to the browser this will work.
Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)

 Dim _stringBuilder As StringBuilder = New StringBuilder()
 Dim _stringWriter As StringWriter = New StringWriter(_stringBuilder)
 Dim _htmlWriter As HtmlTextWriter = New HtmlTextWriter(_stringWriter)
 MyBase.Render(_htmlWriter)
 Dim html As String = _stringBuilder.ToString()

'the html string contains the string to the browser

 writer.Write(html)

"Stephen robinson" <s.m.robinson@select.co.uk> wrote in message
news:OQq8kuM7DHA.1428@TK2MSFTNGP12.phx.gbl...
>
> Dear All,
>
> I wonder if someone can help me I would like to capture the response
> stream/HTML of the current page I am calling so that as well as
> producing the HTML for the client I can also create say a PDF file on
> the fly. I can not use HTTPRequest as I basically wish to print the
> current page in PDF and this will include a potentially large view state
> as well as the request parameters. Also it would mean loading the page
> twice which I dont really want to do.
>
> Any help would be greatfully received.
>
> Steve
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Re: Desperately need help to setup with asp net !!
    ... IHttpHandler (which I might enclose in my server application) or the ... talk is directly between the Browser and the IHttpHandler ... Dim response As HttpResponse = context.Response ... Dim strConnection As String ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Desperately need help to setup with asp net !!
    ... must be done by the Vb.net application on the server. ... What I have hard time to implement is passing data from the browser to ... Dim strConnection As String ... Dim con As New Data.SqlClient.SqlConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Desperately need help to setup with asp net !!
    ... must be done by the Vb.net application on the server. ... What I have hard time to implement is passing data from the browser to ... Dim strConnection As String ... Dim con As New Data.SqlClient.SqlConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Desperately need help to setup with asp net !!
    ... must be done by the Vb.net application on the server. ... What I have hard time to implement is passing data from the browser to ... Dim strConnection As String ... Dim con As New Data.SqlClient.SqlConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Desperately need help to setup with asp net !!
    ... I just want to talk - using a browser - with my application ... running on a server. ... Dim strConnection As String ... Dim con As New Data.SqlClient.SqlConnection ...
    (microsoft.public.dotnet.framework.aspnet)