Intercepting page output...

S

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
 

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

Top