Author: Niall20 | Posted on: 9/15/2008 4:30:26 AM | Views : 321

In a HTTPModule I am trying to retrieve that current pages html.
I have implemented a filter that inheirts from Stream.
I have overriden the Write method with the following
 
public override void Write(byte[] buffer, int offset, int count)
{
string html = Encoding.Default.GetString(buffer, offset, count);

int startPoint = html.IndexOf("<input type=\"hidden\" name=\"__VIEWSTATE\"");

if (startPoint >= 0)
{
int endPoint = html.IndexOf("/>", startPoint) + 2;
Go to the complete details ...