// extract all html and override <h2>News List</h2>
System.IO.StringWriter str = new System.IO.StringWriter();
HtmlTextWriter wrt = new HtmlTextWriter(str);
// render html
base.Render(wrt); //CAPTURE THE CURRENT PAGE HTML SOURCE
wrt.Close();
string html = str.ToString();
//do something with the rendered output
html = html.Replace("<h2>News List</h2>", "<h2>Headlines</h2>");
// write the new html to the page
writer.Write(html);
}
Whatever is in the string html at this point is the rendered page output