Thanks Greg, good suggestion but it didn't help. I did pull the useragent info from a working browser. This really has me stumped. A few more details:
1) Running W2K Pro (development pc) 2) .Net Studio v1.0 (1.0.3705) 3) Source page is an aspx page with a single user control. 4) WebRequest page is a blank page with a bit of codebehind to issue the webrequest to the source page and write the response to disk. I get the script when I run the "source" page in debug mode (and/or simply browse to the page) and view source. If anyone has a suggestion or even an alternative approach I'd sure appreciate it. Thanks, Jon > -----Original Message----- > From: Greg Reinacker [mailto:[EMAIL PROTECTED]] > Sent: Thursday, May 30, 2002 7:01 PM > To: [EMAIL PROTECTED] > Subject: Re: [DOTNET] Http Request > > > Off the top of my head, my guess would be the target .aspx > page is not sending the script due to having no User-agent > header in the request. It would have no indication that the > client can process the script. This of course depends on how > the script code is being generated, which would require more > details of your system. > > If that's the problem, though, you can solve it with code like > > myRequest.UserAgent = "Mozilla/4.0 (compatible; MSIE > 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705)" > > Or whatever is appropriate for your situation. > > Greg Reinacker > Reinacker & Associates, Inc. > http://www.rassoc.com > > > -----Original Message----- > From: dotnet discussion [mailto:[EMAIL PROTECTED]] > On Behalf Of Jon Finley > Sent: Thursday, May 30, 2002 10:35 AM > To: [EMAIL PROTECTED] > Subject: Re: Http Request > > > 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. > > 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.