PC Review


Reply
Thread Tools Rate Thread

After Render

 
 
Just Me
Guest
Posts: n/a
 
      26th Jan 2008
Does anyone know if one can get to a representation of the rendered page (
after ) render. ?


 
Reply With Quote
 
 
 
 
Milosz Skalecki [MCAD]
Guest
Posts: n/a
 
      27th Jan 2008
"View Source"/"Save As" in your browser?

HTH
--
Milosz


"Just Me" wrote:

> Does anyone know if one can get to a representation of the rendered page (
> after ) render. ?
>
>
>

 
Reply With Quote
 
John Timney \(MVP\)
Guest
Posts: n/a
 
      27th Jan 2008
Pretty sure whats written in the render event is a representation of the
rendered page

protected override void Render(HtmlTextWriter writer) {

// 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

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog


"Just Me" <news.microsoft.com> wrote in message
news:(E-Mail Removed)...
> Does anyone know if one can get to a representation of the rendered page
> ( after ) render. ?
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to render [X] ? Tomasz J Microsoft ASP .NET 2 4th Oct 2007 12:58 AM
Render with Div Tag shapper Microsoft ASP .NET 1 5th Dec 2006 04:00 PM
Pre-render or something like it... Coleen Microsoft VB .NET 0 7th Feb 2005 06:28 PM
Page.Render do not render complete page Lau Lei Cheong Microsoft ASP .NET 1 15th May 2004 05:10 AM
Cant render 3d MillMaster Windows XP Video 0 27th Nov 2003 12:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:23 AM.