Intercepting page output...

  • Thread starter Thread starter Stu
  • Start date Start date
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
 
Back
Top