473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Intercepting page output...

Stu
Hi,

I am trying to grab the page output so I can do some html processing before
the page is sent to the browser.

I found a post somewhere which suggests that this would grab the page
content immediately before it is sent to the browser. I have added this to
the page but the sub is not called.

Does anyone know how to get this going?

Protected Overloads Sub Render(ByVal writer As HtmlTextWriter)
If (Page.IsPostBack) Then
Dim sb As New StringBuilder
Dim swr As New StringWriter(sb)
Dim hwr As New HtmlTextWriter(swr)
Render(hwr)
End If
End Sub

Thanks in advance,

Stu
Nov 19 '05 #1
1 1077
Look at setting the HttpResponse.Filter property. This is supposed to allow
you to intercept the response stream after render but prior to sending the
response to the client.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

I am trying to grab the page output so I can do some html processing
before the page is sent to the browser.

I found a post somewhere which suggests that this would grab the page
content immediately before it is sent to the browser. I have added
this to the page but the sub is not called.

Does anyone know how to get this going?

Protected Overloads Sub Render(ByVal writer As HtmlTextWriter)
If (Page.IsPostBack) Then
Dim sb As New StringBuilder
Dim swr As New StringWriter(sb)
Dim hwr As New HtmlTextWriter(swr)
Render(hwr)
End If
End Sub
Thanks in advance,

Stu


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Marc Schellens | last post by:
I want to create an object, which replaces std::cout all output will be put out to std::cout, but optional also copied to a file. But the file output needs to be manipulated: every new line...
6
by: Valery Polyakov | last post by:
I am drawing lines with a semi-transparent color (alpha=100). When these lines intercept, the color becomes more intense. Is there a way to avoid this, so that I would get the same intensity of...
7
by: John | last post by:
Hi, Can anyone point me out how to intercept the keystrokes from a c# application that's not a active window? - intercepting the system wide keystrokes before it hits the target active window? ...
2
by: Nick | last post by:
Hi, Is it possible to pass execution to a view (aspx file), let it do its job, and then capture the output? I want to achieve something like this during a HttpRequest: 1. Invoke the...
1
by: Stu | last post by:
Hi, I am working on a CMS that uses html templates with placeholder strings for the content (eg: %%Content%%). I want to get the web control working on a blank page. Then intercept the page as...
4
by: | last post by:
ASP.NET is a kind of "engine" that takes declarative markup and code and renders these instructions into presentational forms. And every page is a class. With that in mind I'm wondering, a)...
3
by: pamelafluente | last post by:
I am new to asp.net. I have an asp page with a submit button which sends out some information. Instead of having IIS to respond and deal with this information, I would like to have a .NET...
0
by: Gabriel Genellina | last post by:
En Thu, 18 Sep 2008 19:24:26 -0300, Robert Dailey <rcdailey@gmail.com> escribió: Why don't you try it yourself? You may replace builtins.print with your own function too. It's not exactly the...
8
by: K Viltersten | last post by:
I've seen some people calling a stored procedure on MS SQL Server and intercepting an invalid parameter list by a switch statement, demanding that each of the parameters names is exactly as the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.