Newsgroups: microsoft.public.dotnet.framework.aspnet
From: "Ken Cox - Microsoft MVP" <BANSPAMkj...@hotmail.com>
Date: Sat, 11 Feb 2006 23:54:49 -0800
Local: Sun, Feb 12 2006 2:54 am
Subject: Capturing the HTML from an ASP.NET 2.0 page
I'm trying to find a way to program in ASP.NET 2.0 but capture the HTML
output. I found the following routine in ASP.NET 2.0 Cookbook from O'Reilly. It doesn't work if I include a server-side dropdownlist control on the page. The error is RegisterForEventValidation can only be called during Render(); Any ideas? Ken <%@ Page Language="VB" %> <script runat="server"> Try 'render the page output 'save the rendered output to a file 'redirect to another page Finally If (Not IsNothing(tWriter)) Then If (Not IsNothing(strWriter)) Then </script> <html xmlns="http://www.w3.org/1999/xhtml" > You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||