Salut
Alors, si je comprends bien ta question (ou je me trompe), tu cherches à capturer le HTML de sortie de ton application Web.
Si tel est le cas, je te propose une solution trouvée sur le net (je vais quand même pas ré-invinter la poudre^^) : http://www.west-wind.com/weblog/posts/481.aspx .
Le paragraphe "Capturing the Current Page" devrait t'intéresser:
//Extrait...
protected override void Render(HtmlTextWriter writer)
{
// *** Write the HTML into this string builder
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
HtmlTextWriter hWriter = new HtmlTextWriter(sw);
base.Render(hWriter);
// *** store to a string
string PageResult = sb.ToString();//Ici, tu as récupérer ton html
// *** Write it back to the server
writer.Write(PageResult);
}
Voila,
Sinon, tu peux essayer de jouer avec l'événement PreRenderComplete de ta page. Cela te permet d'avoir aussi accès aux composants.
A voir,
Billou_13
|