I am using a HTTPWebRequest object to pull the html from another aspx page on my site. I then write this HTML to a file for use by another page (I know sounds a little goofy but I'm dealing with a legacy system). My problem is that the html returned by the Request object does not include the client side script (JavaScript). When I go directly to the target aspx page and view source I see the script (and it functions properly). So, can anyone point me in the right direction?? I found the following message in the archives which is exactly what I am doing (and not getting the script).
Thanks, Jon Finley On Sun, 26 May 2002 00:28:05 +0200, Pierre Greborio <[EMAIL PROTECTED]> wrote: >Here a very simple sample: > >WebRequest myRequest = WebRequest.Create("http://www.contoso.com"); >WebResponse myResponse = myRequest.GetResponse(); >StreamReader sr = new StreamReader(myResponse.GetResponseStream()); >String html = sr.ReadToEnd(); >sr.Close(); >myResponse.Close(); > >Pierre > >----------------------------------------------- >Pierre Greborio >[EMAIL PROTECTED] >http://www.pierregreborio.it >----------------------------------------------- > > > >-----Original Message----- >From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of >Raphael Nascimento >Sent: Saturday, May 25, 2002 10:28 PM >To: [EMAIL PROTECTED] >Subject: [DOTNET] Http Request > > >How can i get the html with a HttpWebRequest? > >You can read messages from the DOTNET archive, unsubscribe from DOTNET, >or subscribe to other DevelopMentor lists at http://discuss.develop.com. > >You can read messages from the DOTNET archive, unsubscribe from DOTNET, or >subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.